@burdenoff/microfe-buildmyiq 2026.1107.2 → 2026.1107.3

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.
@@ -3,8 +3,8 @@
3
3
  * @module buildmyiq/hooks/useBuiMigration
4
4
  *
5
5
  * Transport for the Migration Center:
6
- * - `buiPreviewCourseImport(fileId)` — what an IMS Common Cartridge import
7
- * would create, with every skipped or converted item. Writes nothing.
6
+ * - `buiPreviewCourseImport(fileId)` — what importing a Common Cartridge or Moodle
7
+ * backup would create, with every skipped or converted item. Writes nothing.
8
8
  * - `buiImportCourse(input)` — imports the package as a new DRAFT course.
9
9
  * - `buiExportCourse(courseId, format)` / `buiExportCourseGradebook(courseId)`
10
10
  * — open-standards exports, returned inline as base64.
@@ -15,7 +15,7 @@
15
15
  */
16
16
  export type BuiMigrationIssueSeverity = 'INFO' | 'WARNING' | 'ERROR';
17
17
  export type BuiMigrationJobKind = 'COURSE_IMPORT' | 'COURSE_EXPORT' | 'GRADEBOOK_EXPORT';
18
- export type BuiMigrationFormat = 'COMMON_CARTRIDGE' | 'BUILDMYIQ_JSON' | 'GRADEBOOK_CSV';
18
+ export type BuiMigrationFormat = 'COMMON_CARTRIDGE' | 'MOODLE_BACKUP' | 'BUILDMYIQ_JSON' | 'GRADEBOOK_CSV';
19
19
  export type BuiCourseExportFormat = 'COMMON_CARTRIDGE' | 'BUILDMYIQ_JSON';
20
20
  export interface BuiMigrationIssue {
21
21
  severity: BuiMigrationIssueSeverity;
@@ -1 +1 @@
1
- {"version":3,"file":"useBuiMigration.d.ts","sourceRoot":"","sources":["../../../src/buildmyiq/hooks/useBuiMigration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,eAAe,GAAG,kBAAkB,CAAC;AACzF,MAAM,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,KAAK,CAAC;AAE3C,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,GAAI,eAAU;WAUX,eAAe,EAAE;cAAY;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;SAWnF,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,yBAAyB,yGAmBrC,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iDAAiD;AACjD,eAAO,MAAM,kBAAkB;SAOhB,eAAe;YACZ;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;wCAmB5D,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,kBAAkB;cAIU,MAAM;YAAU,qBAAqB;WAY7E,CAAC;AAEF,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,qGAgBjC,CAAC;AAEF,2CAA2C;AAC3C,eAAO,MAAM,YAAY,GACvB,UAAU,IAAI,CAAC,kBAAkB,EAAE,eAAe,GAAG,UAAU,CAAC,KAC/D,IAKF,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,UAAU,GACrB,UAAU,IAAI,CAAC,kBAAkB,EAAE,eAAe,GAAG,UAAU,GAAG,UAAU,CAAC,KAC5E,IAcF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBuiMigration.js","names":[],"sources":["../../../src/buildmyiq/hooks/useBuiMigration.ts"],"sourcesContent":["/**\n * Buildmyiq — course migration hooks (BOFF-4437).\n * @module buildmyiq/hooks/useBuiMigration\n *\n * Transport for the Migration Center:\n * - `buiPreviewCourseImport(fileId)` — what an IMS Common Cartridge import\n * would create, with every skipped or converted item. Writes nothing.\n * - `buiImportCourse(input)` — imports the package as a new DRAFT course.\n * - `buiExportCourse(courseId, format)` / `buiExportCourseGradebook(courseId)`\n * — open-standards exports, returned inline as base64.\n * - `buiMigrationJobs` — the migration audit trail.\n *\n * Packages are uploaded PRIVATE through the platform file flow\n * (`useBuiFileUpload`), so only the uploader can import them.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useBuiRequestScope } from './requestScope';\nimport { wspaceFetch } from './useBuiFiles';\n\nexport type BuiMigrationIssueSeverity = 'INFO' | 'WARNING' | 'ERROR';\nexport type BuiMigrationJobKind = 'COURSE_IMPORT' | 'COURSE_EXPORT' | 'GRADEBOOK_EXPORT';\nexport type BuiMigrationFormat = 'COMMON_CARTRIDGE' | 'BUILDMYIQ_JSON' | 'GRADEBOOK_CSV';\nexport type BuiCourseExportFormat = 'COMMON_CARTRIDGE' | 'BUILDMYIQ_JSON';\n\nexport interface BuiMigrationIssue {\n severity: BuiMigrationIssueSeverity;\n code: string;\n message: string;\n ref: string | null;\n}\n\nexport interface BuiMigrationStats {\n moduleCount: number;\n lessonCount: number;\n assessmentCount: number;\n questionCount: number;\n skippedCount: number;\n rowCount: number;\n byteSize: number;\n}\n\nexport interface BuiMigrationJob {\n id: string;\n kind: BuiMigrationJobKind;\n status: 'COMPLETED' | 'FAILED';\n format: BuiMigrationFormat;\n sourceSystem: string | null;\n fileId: string | null;\n fileName: string | null;\n courseId: string | null;\n courseTitle: string | null;\n stats: BuiMigrationStats;\n issues: BuiMigrationIssue[];\n createdAt: string;\n createdBy: string;\n}\n\nexport interface BuiCourseImportPreview {\n fileName: string;\n format: BuiMigrationFormat;\n sourceSystem: string | null;\n standardVersion: string | null;\n title: string;\n description: string | null;\n stats: BuiMigrationStats;\n modules: Array<{ title: string; items: Array<{ title: string; kind: string; detail: string }> }>;\n issues: BuiMigrationIssue[];\n canImport: boolean;\n}\n\nexport interface BuiMigrationExport {\n job: BuiMigrationJob;\n fileName: string;\n mimeType: string;\n contentBase64: string;\n byteSize: number;\n}\n\nconst STATS_FIELDS = `stats { moduleCount lessonCount assessmentCount questionCount skippedCount rowCount byteSize }`;\nconst ISSUE_FIELDS = `issues { severity code message ref }`;\nconst JOB_FIELDS = `\n id kind status format sourceSystem fileId fileName courseId courseTitle createdAt createdBy\n ${STATS_FIELDS}\n ${ISSUE_FIELDS}\n`;\nconst EXPORT_FIELDS = `fileName mimeType contentBase64 byteSize job { ${JOB_FIELDS} }`;\n\nexport const migrationKeys = {\n jobs: (offset: number) => ['buildmyiq', 'migrationJobs', offset] as const,\n allJobs: ['buildmyiq', 'migrationJobs'] as const,\n};\n\nexport const MIGRATION_JOBS_PAGE_SIZE = 20;\n\n/** The migration audit trail, newest first, one page at a time. */\nexport const useBuiMigrationJobs = (offset = 0) => {\n const apiGatewayUrl = useBuiRequestScope();\n return useQuery({\n queryKey: migrationKeys.jobs(offset),\n queryFn: async () => {\n const pagination =\n offset > 0\n ? { limit: MIGRATION_JOBS_PAGE_SIZE, offset }\n : { limit: MIGRATION_JOBS_PAGE_SIZE };\n const data = await wspaceFetch<{\n buiMigrationJobs: { items: BuiMigrationJob[]; pageInfo: { hasMore: boolean } };\n }>(\n `query BuiMigrationJobs($pagination: PaginationInput) {\n buiMigrationJobs(pagination: $pagination) { items { ${JOB_FIELDS} } pageInfo { hasMore } }\n }`,\n { pagination },\n apiGatewayUrl\n );\n return data.buiMigrationJobs;\n },\n });\n};\n\n/** Reads an uploaded package and describes the import. Read-only on the server. */\nexport const useBuiPreviewCourseImport = () => {\n const apiGatewayUrl = useBuiRequestScope();\n return useMutation({\n mutationFn: async (fileId: string) => {\n const data = await wspaceFetch<{ buiPreviewCourseImport: BuiCourseImportPreview }>(\n `query BuiPreviewCourseImport($fileId: ID!) {\n buiPreviewCourseImport(fileId: $fileId) {\n fileName format sourceSystem standardVersion title description canImport\n ${STATS_FIELDS}\n modules { title items { title kind detail } }\n ${ISSUE_FIELDS}\n }\n }`,\n { fileId },\n apiGatewayUrl\n );\n return data.buiPreviewCourseImport;\n },\n });\n};\n\nexport interface BuiImportCourseInput {\n fileId: string;\n title?: string;\n}\n\n/** Imports the package as a new draft course. */\nexport const useBuiImportCourse = () => {\n const apiGatewayUrl = useBuiRequestScope();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: BuiImportCourseInput) => {\n const data = await wspaceFetch<{\n buiImportCourse: {\n job: BuiMigrationJob;\n course: { id: string; title: string; slug: string };\n };\n }>(\n `mutation BuiImportCourse($input: BuiImportCourseInput!) {\n buiImportCourse(input: $input) { job { ${JOB_FIELDS} } course { id title slug } }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.buiImportCourse;\n },\n onSettled: async () => {\n // A failed import is recorded too, so the audit trail changes either way.\n await Promise.all([\n qc.invalidateQueries({ queryKey: migrationKeys.allJobs }),\n qc.invalidateQueries({ queryKey: ['buildmyiq', 'courses'] }),\n ]);\n },\n });\n};\n\n/** Exports a course as Common Cartridge or BuildMyIQ JSON. */\nexport const useBuiExportCourse = () => {\n const apiGatewayUrl = useBuiRequestScope();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (args: { courseId: string; format: BuiCourseExportFormat }) => {\n const data = await wspaceFetch<{ buiExportCourse: BuiMigrationExport }>(\n `mutation BuiExportCourse($courseId: ID!, $format: BuiCourseExportFormat!) {\n buiExportCourse(courseId: $courseId, format: $format) { ${EXPORT_FIELDS} }\n }`,\n args,\n apiGatewayUrl\n );\n return data.buiExportCourse;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: migrationKeys.allJobs }),\n });\n};\n\n/** Exports a course's gradebook as CSV. */\nexport const useBuiExportGradebook = () => {\n const apiGatewayUrl = useBuiRequestScope();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (courseId: string) => {\n const data = await wspaceFetch<{ buiExportCourseGradebook: BuiMigrationExport }>(\n `mutation BuiExportCourseGradebook($courseId: ID!) {\n buiExportCourseGradebook(courseId: $courseId) { ${EXPORT_FIELDS} }\n }`,\n { courseId },\n apiGatewayUrl\n );\n return data.buiExportCourseGradebook;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: migrationKeys.allJobs }),\n });\n};\n\n/** Decode an inline export into a Blob. */\nexport const exportToBlob = (\n exported: Pick<BuiMigrationExport, 'contentBase64' | 'mimeType'>\n): Blob => {\n const binary = atob(exported.contentBase64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);\n return new Blob([bytes], { type: exported.mimeType });\n};\n\n/** Save an inline export to the user's device. */\nexport const saveExport = (\n exported: Pick<BuiMigrationExport, 'contentBase64' | 'mimeType' | 'fileName'>\n): void => {\n const url = URL.createObjectURL(exportToBlob(exported));\n try {\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = exported.fileName;\n anchor.rel = 'noopener';\n document.body.appendChild(anchor);\n anchor.click();\n anchor.remove();\n } finally {\n // Give the browser a moment to start the download before revoking.\n window.setTimeout(() => URL.revokeObjectURL(url), 10_000);\n }\n};\n"],"mappings":";;;;AAgFA,IAAM,IAAe,kGACf,IAAe,wCACf,IAAa;;IAEf,EAAa;IACb,EAAa;GAEX,IAAgB,kDAAkD,EAAW,KAEtE,IAAgB;CAC3B,OAAO,MAAmB;EAAC;EAAa;EAAiB;CAAM;CAC/D,SAAS,CAAC,aAAa,eAAe;AACxC,GAKa,KAAuB,IAAS,MAAM;CACjD,IAAM,IAAgB,EAAmB;CACzC,OAAO,EAAS;EACd,UAAU,EAAc,KAAK,CAAM;EACnC,SAAS,YAAY;GACnB,IAAM,IACJ,IAAS,IACL;IAAE,OAAA;IAAiC;GAAO,IAC1C,EAAE,OAAA,GAAgC;GAUxC,QAAO,MATY,EAGjB;gEACwD,EAAW;YAEnE,EAAE,cAAW,GACb,CACF,EAAA,CACY;EACd;CACF,CAAC;AACH,GAGa,UAAkC;CAC7C,IAAM,IAAgB,EAAmB;CACzC,OAAO,EAAY,EACjB,YAAY,OAAO,OAaV,MAZY,EACjB;;;cAGM,EAAa;;cAEb,EAAa;;YAGnB,EAAE,UAAO,GACT,CACF,EAAA,CACY,uBAEhB,CAAC;AACH,GAQa,UAA2B;CACtC,IAAM,IAAgB,EAAm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ACb,SAAS,KAAK,YAAY,CAAM,GAChC,EAAO,MAAM,GACb,EAAO,OAAO;CAChB,UAAU;EAER,OAAO,iBAAiB,IAAI,gBAAgB,CAAG,GAAG,GAAM;CAC1D;AACF"}
1
+ {"version":3,"file":"useBuiMigration.js","names":[],"sources":["../../../src/buildmyiq/hooks/useBuiMigration.ts"],"sourcesContent":["/**\n * Buildmyiq — course migration hooks (BOFF-4437).\n * @module buildmyiq/hooks/useBuiMigration\n *\n * Transport for the Migration Center:\n * - `buiPreviewCourseImport(fileId)` — what importing a Common Cartridge or Moodle\n * backup would create, with every skipped or converted item. Writes nothing.\n * - `buiImportCourse(input)` — imports the package as a new DRAFT course.\n * - `buiExportCourse(courseId, format)` / `buiExportCourseGradebook(courseId)`\n * — open-standards exports, returned inline as base64.\n * - `buiMigrationJobs` — the migration audit trail.\n *\n * Packages are uploaded PRIVATE through the platform file flow\n * (`useBuiFileUpload`), so only the uploader can import them.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useBuiRequestScope } from './requestScope';\nimport { wspaceFetch } from './useBuiFiles';\n\nexport type BuiMigrationIssueSeverity = 'INFO' | 'WARNING' | 'ERROR';\nexport type BuiMigrationJobKind = 'COURSE_IMPORT' | 'COURSE_EXPORT' | 'GRADEBOOK_EXPORT';\nexport type BuiMigrationFormat =\n 'COMMON_CARTRIDGE' | 'MOODLE_BACKUP' | 'BUILDMYIQ_JSON' | 'GRADEBOOK_CSV';\nexport type BuiCourseExportFormat = 'COMMON_CARTRIDGE' | 'BUILDMYIQ_JSON';\n\nexport interface BuiMigrationIssue {\n severity: BuiMigrationIssueSeverity;\n code: string;\n message: string;\n ref: string | null;\n}\n\nexport interface BuiMigrationStats {\n moduleCount: number;\n lessonCount: number;\n assessmentCount: number;\n questionCount: number;\n skippedCount: number;\n rowCount: number;\n byteSize: number;\n}\n\nexport interface BuiMigrationJob {\n id: string;\n kind: BuiMigrationJobKind;\n status: 'COMPLETED' | 'FAILED';\n format: BuiMigrationFormat;\n sourceSystem: string | null;\n fileId: string | null;\n fileName: string | null;\n courseId: string | null;\n courseTitle: string | null;\n stats: BuiMigrationStats;\n issues: BuiMigrationIssue[];\n createdAt: string;\n createdBy: string;\n}\n\nexport interface BuiCourseImportPreview {\n fileName: string;\n format: BuiMigrationFormat;\n sourceSystem: string | null;\n standardVersion: string | null;\n title: string;\n description: string | null;\n stats: BuiMigrationStats;\n modules: Array<{ title: string; items: Array<{ title: string; kind: string; detail: string }> }>;\n issues: BuiMigrationIssue[];\n canImport: boolean;\n}\n\nexport interface BuiMigrationExport {\n job: BuiMigrationJob;\n fileName: string;\n mimeType: string;\n contentBase64: string;\n byteSize: number;\n}\n\nconst STATS_FIELDS = `stats { moduleCount lessonCount assessmentCount questionCount skippedCount rowCount byteSize }`;\nconst ISSUE_FIELDS = `issues { severity code message ref }`;\nconst JOB_FIELDS = `\n id kind status format sourceSystem fileId fileName courseId courseTitle createdAt createdBy\n ${STATS_FIELDS}\n ${ISSUE_FIELDS}\n`;\nconst EXPORT_FIELDS = `fileName mimeType contentBase64 byteSize job { ${JOB_FIELDS} }`;\n\nexport const migrationKeys = {\n jobs: (offset: number) => ['buildmyiq', 'migrationJobs', offset] as const,\n allJobs: ['buildmyiq', 'migrationJobs'] as const,\n};\n\nexport const MIGRATION_JOBS_PAGE_SIZE = 20;\n\n/** The migration audit trail, newest first, one page at a time. */\nexport const useBuiMigrationJobs = (offset = 0) => {\n const apiGatewayUrl = useBuiRequestScope();\n return useQuery({\n queryKey: migrationKeys.jobs(offset),\n queryFn: async () => {\n const pagination =\n offset > 0\n ? { limit: MIGRATION_JOBS_PAGE_SIZE, offset }\n : { limit: MIGRATION_JOBS_PAGE_SIZE };\n const data = await wspaceFetch<{\n buiMigrationJobs: { items: BuiMigrationJob[]; pageInfo: { hasMore: boolean } };\n }>(\n `query BuiMigrationJobs($pagination: PaginationInput) {\n buiMigrationJobs(pagination: $pagination) { items { ${JOB_FIELDS} } pageInfo { hasMore } }\n }`,\n { pagination },\n apiGatewayUrl\n );\n return data.buiMigrationJobs;\n },\n });\n};\n\n/** Reads an uploaded package and describes the import. Read-only on the server. */\nexport const useBuiPreviewCourseImport = () => {\n const apiGatewayUrl = useBuiRequestScope();\n return useMutation({\n mutationFn: async (fileId: string) => {\n const data = await wspaceFetch<{ buiPreviewCourseImport: BuiCourseImportPreview }>(\n `query BuiPreviewCourseImport($fileId: ID!) {\n buiPreviewCourseImport(fileId: $fileId) {\n fileName format sourceSystem standardVersion title description canImport\n ${STATS_FIELDS}\n modules { title items { title kind detail } }\n ${ISSUE_FIELDS}\n }\n }`,\n { fileId },\n apiGatewayUrl\n );\n return data.buiPreviewCourseImport;\n },\n });\n};\n\nexport interface BuiImportCourseInput {\n fileId: string;\n title?: string;\n}\n\n/** Imports the package as a new draft course. */\nexport const useBuiImportCourse = () => {\n const apiGatewayUrl = useBuiRequestScope();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: BuiImportCourseInput) => {\n const data = await wspaceFetch<{\n buiImportCourse: {\n job: BuiMigrationJob;\n course: { id: string; title: string; slug: string };\n };\n }>(\n `mutation BuiImportCourse($input: BuiImportCourseInput!) {\n buiImportCourse(input: $input) { job { ${JOB_FIELDS} } course { id title slug } }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.buiImportCourse;\n },\n onSettled: async () => {\n // A failed import is recorded too, so the audit trail changes either way.\n await Promise.all([\n qc.invalidateQueries({ queryKey: migrationKeys.allJobs }),\n qc.invalidateQueries({ queryKey: ['buildmyiq', 'courses'] }),\n ]);\n },\n });\n};\n\n/** Exports a course as Common Cartridge or BuildMyIQ JSON. */\nexport const useBuiExportCourse = () => {\n const apiGatewayUrl = useBuiRequestScope();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (args: { courseId: string; format: BuiCourseExportFormat }) => {\n const data = await wspaceFetch<{ buiExportCourse: BuiMigrationExport }>(\n `mutation BuiExportCourse($courseId: ID!, $format: BuiCourseExportFormat!) {\n buiExportCourse(courseId: $courseId, format: $format) { ${EXPORT_FIELDS} }\n }`,\n args,\n apiGatewayUrl\n );\n return data.buiExportCourse;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: migrationKeys.allJobs }),\n });\n};\n\n/** Exports a course's gradebook as CSV. */\nexport const useBuiExportGradebook = () => {\n const apiGatewayUrl = useBuiRequestScope();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (courseId: string) => {\n const data = await wspaceFetch<{ buiExportCourseGradebook: BuiMigrationExport }>(\n `mutation BuiExportCourseGradebook($courseId: ID!) {\n buiExportCourseGradebook(courseId: $courseId) { ${EXPORT_FIELDS} }\n }`,\n { courseId },\n apiGatewayUrl\n );\n return data.buiExportCourseGradebook;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: migrationKeys.allJobs }),\n });\n};\n\n/** Decode an inline export into a Blob. */\nexport const exportToBlob = (\n exported: Pick<BuiMigrationExport, 'contentBase64' | 'mimeType'>\n): Blob => {\n const binary = atob(exported.contentBase64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);\n return new Blob([bytes], { type: exported.mimeType });\n};\n\n/** Save an inline export to the user's device. */\nexport const saveExport = (\n exported: Pick<BuiMigrationExport, 'contentBase64' | 'mimeType' | 'fileName'>\n): void => {\n const url = URL.createObjectURL(exportToBlob(exported));\n try {\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = exported.fileName;\n anchor.rel = 'noopener';\n document.body.appendChild(anchor);\n anchor.click();\n anchor.remove();\n } finally {\n // Give the browser a moment to start the download before revoking.\n window.setTimeout(() => URL.revokeObjectURL(url), 10_000);\n }\n};\n"],"mappings":";;;;AAiFA,IAAM,IAAe,kGACf,IAAe,wCACf,IAAa;;IAEf,EAAa;IACb,EAAa;GAEX,IAAgB,kDAAkD,EAAW,KAEtE,IAAgB;CAC3B,OAAO,MAAmB;EAAC;EAAa;EAAiB;CAAM;CAC/D,SAAS,CAAC,aAAa,eAA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F,EAAA,CACY;EAEd,iBAAiB,EAAG,kBAAkB,EAAE,UAAU,EAAc,QAAQ,CAAC;CAC3E,CAAC;AACH,GAGa,KACX,MACS;CACT,IAAM,IAAS,KAAK,EAAS,aAAa,GACpC,IAAQ,IAAI,WAAW,EAAO,MAAM;CAC1C,KAAK,IAAI,IAAI,GAAG,IAAI,EAAO,QAAQ,KAAK,EAAM,KAAK,EAAO,WAAW,CAAC;CACtE,OAAO,IAAI,KAAK,CAAC,CAAK,GAAG,EAAE,MAAM,EAAS,SAAS,CAAC;AACtD,GAGa,KACX,MACS;CACT,IAAM,IAAM,IAAI,gBAAgB,EAAa,CAAQ,CAAC;CACtD,IAAI;EACF,IAAM,IAAS,SAAS,cAAc,GAAG;EAMzC,AALA,EAAO,OAAO,GACd,EAAO,WAAW,EAAS,UAC3B,EAAO,MAAM,YACb,SAAS,KAAK,YAAY,CAAM,GAChC,EAAO,MAAM,GACb,EAAO,OAAO;CAChB,UAAU;EAER,OAAO,iBAAiB,IAAI,gBAAgB,CAAG,GAAG,GAAM;CAC1D;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationCenterPage.d.ts","sourceRoot":"","sources":["../../../../src/buildmyiq/pages/migration/MigrationCenterPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAe,EAAE,EAAE,MAAM,OAAO,CAAC;AA8kB7C,eAAO,MAAM,mBAAmB,EAAE,EA0BjC,CAAC"}
1
+ {"version":3,"file":"MigrationCenterPage.d.ts","sourceRoot":"","sources":["../../../../src/buildmyiq/pages/migration/MigrationCenterPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAe,EAAE,EAAE,MAAM,OAAO,CAAC;AA4lB7C,eAAO,MAAM,mBAAmB,EAAE,EA0BjC,CAAC"}
@@ -18,7 +18,7 @@ import { AlertTriangle as C, ArrowRightLeft as w, CheckCircle2 as T, Download as
18
18
  import { jsx as M, jsxs as N } from "react/jsx-runtime";
19
19
  import { Button as P, GlassCard as F, Input as I } from "@burdenoff/fe-libs/ui";
20
20
  //#region src/buildmyiq/pages/migration/MigrationCenterPage.tsx
21
- var L = ".imscc,.zip,application/zip", R = [
21
+ var L = ".imscc,.zip,.mbz,application/zip,application/gzip,application/x-gzip,application/vnd.moodle.backup", R = [
22
22
  {
23
23
  lms: "Canvas",
24
24
  steps: "Settings → Export Course Content → Course → Create Export, then download the .imscc file."
@@ -29,13 +29,13 @@ var L = ".imscc,.zip,application/zip", R = [
29
29
  },
30
30
  {
31
31
  lms: "Moodle",
32
- steps: "Use an IMS Common Cartridge export of the course (Moodle backups, .mbz, are not read yet)."
32
+ steps: "Course → Backup, keep the defaults (no user data needed), then download the .mbz file. A Common Cartridge export works too."
33
33
  },
34
34
  {
35
35
  lms: "Brightspace (D2L)",
36
36
  steps: "Course Admin → Import/Export/Copy Components → Export as Common Cartridge."
37
37
  }
38
- ], z = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`, B = (e, t) => e instanceof Error && e.message ? e.message : t, V = (e) => e === "ERROR" ? /* @__PURE__ */ M(j, {
38
+ ], z = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`, B = (e) => e.format === "MOODLE_BACKUP" ? e.standardVersion ? `Moodle backup (Moodle ${e.standardVersion})` : "Moodle backup" : e.standardVersion ? `Common Cartridge ${e.standardVersion}` : "Common Cartridge", V = (e, t) => e instanceof Error && e.message ? e.message : t, H = (e) => e === "ERROR" ? /* @__PURE__ */ M(j, {
39
39
  "aria-hidden": "true",
40
40
  className: "h-4 w-4 shrink-0 text-status-error-text"
41
41
  }) : e === "WARNING" ? /* @__PURE__ */ M(C, {
@@ -44,19 +44,19 @@ var L = ".imscc,.zip,application/zip", R = [
44
44
  }) : /* @__PURE__ */ M(k, {
45
45
  "aria-hidden": "true",
46
46
  className: "h-4 w-4 shrink-0 text-text-tertiary"
47
- }), H = {
47
+ }), U = {
48
48
  ERROR: 0,
49
49
  WARNING: 1,
50
50
  INFO: 2
51
- }, U = ({ issues: e, emptyText: t }) => e.length === 0 ? t ? /* @__PURE__ */ M("p", {
51
+ }, W = ({ issues: e, emptyText: t }) => e.length === 0 ? t ? /* @__PURE__ */ M("p", {
52
52
  className: "text-sm text-text-secondary",
53
53
  children: t
54
54
  }) : null : /* @__PURE__ */ M("ul", {
55
55
  className: "flex flex-col gap-2",
56
56
  "aria-label": "Migration issues",
57
- children: [...e].sort((e, t) => H[e.severity] - H[t.severity]).map((e, t) => /* @__PURE__ */ N("li", {
57
+ children: [...e].sort((e, t) => U[e.severity] - U[t.severity]).map((e, t) => /* @__PURE__ */ N("li", {
58
58
  className: "flex items-start gap-2 text-sm",
59
- children: [V(e.severity), /* @__PURE__ */ N("span", {
59
+ children: [H(e.severity), /* @__PURE__ */ N("span", {
60
60
  className: "min-w-0",
61
61
  children: [
62
62
  /* @__PURE__ */ N("span", {
@@ -78,7 +78,7 @@ var L = ".imscc,.zip,application/zip", R = [
78
78
  ]
79
79
  })]
80
80
  }, `${e.code}-${t}`))
81
- }), W = ({ label: e, value: t }) => /* @__PURE__ */ N("div", {
81
+ }), G = ({ label: e, value: t }) => /* @__PURE__ */ N("div", {
82
82
  className: "rounded-lg border border-border-seam bg-bg-sunken px-3 py-2",
83
83
  children: [/* @__PURE__ */ M("dt", {
84
84
  className: "text-xs text-text-tertiary",
@@ -87,7 +87,7 @@ var L = ".imscc,.zip,application/zip", R = [
87
87
  className: "text-lg font-semibold text-text-primary",
88
88
  children: t
89
89
  })]
90
- }), G = ({ preview: t, fileId: n, onReset: i }) => {
90
+ }), K = ({ preview: t, fileId: n, onReset: i }) => {
91
91
  let { navigateTo: a } = e(), o = m(), [s, c] = S(t.title), [l, u] = S(null), d = b(), f = async () => {
92
92
  u(null);
93
93
  try {
@@ -96,7 +96,7 @@ var L = ".imscc,.zip,application/zip", R = [
96
96
  title: s.trim() || void 0
97
97
  });
98
98
  } catch (e) {
99
- u(B(e, "The course could not be imported."));
99
+ u(V(e, "The course could not be imported."));
100
100
  }
101
101
  }, p = o.data;
102
102
  return p ? /* @__PURE__ */ N(F, {
@@ -161,7 +161,7 @@ var L = ".imscc,.zip,application/zip", R = [
161
161
  children: [
162
162
  t.fileName,
163
163
  t.sourceSystem ? ` · exported from ${t.sourceSystem}` : "",
164
- t.standardVersion ? ` · Common Cartridge ${t.standardVersion}` : "",
164
+ ` · ${B(t)}`,
165
165
  ` · ${z(t.stats.byteSize)}`
166
166
  ]
167
167
  })]
@@ -175,23 +175,23 @@ var L = ".imscc,.zip,application/zip", R = [
175
175
  /* @__PURE__ */ N("dl", {
176
176
  className: "grid grid-cols-2 gap-2 sm:grid-cols-5",
177
177
  children: [
178
- /* @__PURE__ */ M(W, {
178
+ /* @__PURE__ */ M(G, {
179
179
  label: "Modules",
180
180
  value: t.stats.moduleCount
181
181
  }),
182
- /* @__PURE__ */ M(W, {
182
+ /* @__PURE__ */ M(G, {
183
183
  label: "Lessons",
184
184
  value: t.stats.lessonCount
185
185
  }),
186
- /* @__PURE__ */ M(W, {
186
+ /* @__PURE__ */ M(G, {
187
187
  label: "Quizzes",
188
188
  value: t.stats.assessmentCount
189
189
  }),
190
- /* @__PURE__ */ M(W, {
190
+ /* @__PURE__ */ M(G, {
191
191
  label: "Questions",
192
192
  value: t.stats.questionCount
193
193
  }),
194
- /* @__PURE__ */ M(W, {
194
+ /* @__PURE__ */ M(G, {
195
195
  label: "Skipped items",
196
196
  value: t.stats.skippedCount
197
197
  })
@@ -234,7 +234,7 @@ var L = ".imscc,.zip,application/zip", R = [
234
234
  id: `${d}-issues`,
235
235
  className: "text-sm font-semibold text-text-primary",
236
236
  children: "What will not come across as-is"
237
- }), /* @__PURE__ */ M(U, {
237
+ }), /* @__PURE__ */ M(W, {
238
238
  issues: t.issues,
239
239
  emptyText: "Everything in the package can be imported."
240
240
  })]
@@ -275,7 +275,7 @@ var L = ".imscc,.zip,application/zip", R = [
275
275
  })
276
276
  ]
277
277
  });
278
- }, K = () => {
278
+ }, q = () => {
279
279
  let e = x(null), { upload: t, isUploading: n, progress: r } = u({ visibility: "PRIVATE" }), i = g(), [a, o] = S(null), [s, c] = S(null), l = b(), d = () => {
280
280
  o(null), c(null), i.reset(), e.current && (e.current.value = "");
281
281
  }, f = async (e) => {
@@ -286,7 +286,7 @@ var L = ".imscc,.zip,application/zip", R = [
286
286
  let e = await t(n);
287
287
  o(e.fileId), await i.mutateAsync(e.fileId);
288
288
  } catch (e) {
289
- c(B(e, "The package could not be read."));
289
+ c(V(e, "The package could not be read."));
290
290
  }
291
291
  }
292
292
  }, p = n || i.isPending;
@@ -301,7 +301,7 @@ var L = ".imscc,.zip,application/zip", R = [
301
301
  children: "Import a course from another LMS"
302
302
  }), /* @__PURE__ */ M("p", {
303
303
  className: "text-sm text-text-secondary",
304
- children: "Upload an IMS Common Cartridge (.imscc) package. Pages, links, discussions, assignments and quizzes become a draft course; nothing is published until you choose to."
304
+ children: "Upload an IMS Common Cartridge (.imscc) package or a Moodle course backup (.mbz). Pages, links, discussions, assignments and quizzes become a draft course; nothing is published until you choose to."
305
305
  })] }),
306
306
  /* @__PURE__ */ M("ul", {
307
307
  className: "grid gap-2 sm:grid-cols-2",
@@ -338,7 +338,7 @@ var L = ".imscc,.zip,application/zip", R = [
338
338
  children: [/* @__PURE__ */ M(A, {
339
339
  "aria-hidden": "true",
340
340
  className: "me-1.5 h-4 w-4"
341
- }), n ? `Uploading… ${r}%` : i.isPending ? "Reading package…" : "Choose a .imscc package"]
341
+ }), n ? `Uploading… ${r}%` : i.isPending ? "Reading package…" : "Choose a .imscc or .mbz file"]
342
342
  })
343
343
  }),
344
344
  /* @__PURE__ */ M("label", {
@@ -354,19 +354,19 @@ var L = ".imscc,.zip,application/zip", R = [
354
354
  children: s
355
355
  })
356
356
  ]
357
- }), i.data && a && /* @__PURE__ */ M(G, {
357
+ }), i.data && a && /* @__PURE__ */ M(K, {
358
358
  preview: i.data,
359
359
  fileId: a,
360
360
  onReset: d
361
361
  }, a)]
362
362
  });
363
- }, q = [{
363
+ }, J = [{
364
364
  value: "COMMON_CARTRIDGE",
365
365
  label: "IMS Common Cartridge 1.1 (.imscc)"
366
366
  }, {
367
367
  value: "BUILDMYIQ_JSON",
368
368
  label: "BuildMyIQ course JSON (.json)"
369
- }], J = () => {
369
+ }], Y = () => {
370
370
  let e = l({ limit: 100 }), t = f(), n = p(), [r, i] = S(""), [c, u] = S("COMMON_CARTRIDGE"), [m, h] = S(null), g = b(), x = b(), C = e.data?.items ?? [], w = t.isPending || n.isPending, T = async (e) => {
371
371
  if (r) {
372
372
  h(null);
@@ -382,7 +382,7 @@ var L = ".imscc,.zip,application/zip", R = [
382
382
  } catch (e) {
383
383
  h({
384
384
  kind: "error",
385
- text: B(e, "The export failed.")
385
+ text: V(e, "The export failed.")
386
386
  });
387
387
  }
388
388
  }
@@ -429,7 +429,7 @@ var L = ".imscc,.zip,application/zip", R = [
429
429
  id: x,
430
430
  value: c,
431
431
  onChange: (e) => u(e),
432
- options: q
432
+ options: J
433
433
  })
434
434
  })]
435
435
  }),
@@ -469,11 +469,11 @@ var L = ".imscc,.zip,application/zip", R = [
469
469
  })
470
470
  ]
471
471
  });
472
- }, Y = {
472
+ }, X = {
473
473
  COURSE_IMPORT: "Course import",
474
474
  COURSE_EXPORT: "Course export",
475
475
  GRADEBOOK_EXPORT: "Gradebook export"
476
- }, X = ({ job: e }) => {
476
+ }, Z = ({ job: e }) => {
477
477
  let [t, a] = S(!1), o = b(), s = e.kind === "GRADEBOOK_EXPORT" ? `${e.stats.rowCount} rows` : `${e.stats.moduleCount} modules · ${e.stats.lessonCount} lessons · ${e.stats.assessmentCount} quizzes`;
478
478
  return /* @__PURE__ */ N("li", {
479
479
  className: "rounded-lg border border-border-seam p-3",
@@ -486,7 +486,7 @@ var L = ".imscc,.zip,application/zip", R = [
486
486
  /* @__PURE__ */ N("p", {
487
487
  className: "flex flex-wrap items-center gap-2 text-sm font-medium text-text-primary",
488
488
  children: [
489
- Y[e.kind],
489
+ X[e.kind],
490
490
  /* @__PURE__ */ M(i, { status: e.status }),
491
491
  /* @__PURE__ */ M("span", {
492
492
  className: "text-xs font-normal text-text-tertiary",
@@ -525,10 +525,10 @@ var L = ".imscc,.zip,application/zip", R = [
525
525
  }), t && /* @__PURE__ */ M("div", {
526
526
  id: o,
527
527
  className: "mt-3 border-t border-border-seam pt-3",
528
- children: /* @__PURE__ */ M(U, { issues: e.issues })
528
+ children: /* @__PURE__ */ M(W, { issues: e.issues })
529
529
  })]
530
530
  });
531
- }, Z = () => {
531
+ }, Q = () => {
532
532
  let [e, t] = S(0), n = h(e);
533
533
  if (n.isLoading) return /* @__PURE__ */ M(s, { label: "Loading migration history…" });
534
534
  if (n.isError) return /* @__PURE__ */ M(o, {
@@ -546,7 +546,7 @@ var L = ".imscc,.zip,application/zip", R = [
546
546
  children: [/* @__PURE__ */ M("ul", {
547
547
  className: "flex flex-col gap-2",
548
548
  "aria-label": "Migration history",
549
- children: r.map((e) => /* @__PURE__ */ M(X, { job: e }, e.id))
549
+ children: r.map((e) => /* @__PURE__ */ M(Z, { job: e }, e.id))
550
550
  }), /* @__PURE__ */ N("div", {
551
551
  className: "flex justify-between",
552
552
  children: [/* @__PURE__ */ M(P, {
@@ -564,7 +564,7 @@ var L = ".imscc,.zip,application/zip", R = [
564
564
  })]
565
565
  })]
566
566
  });
567
- }, Q = () => {
567
+ }, $ = () => {
568
568
  let [e, n] = S("import");
569
569
  return /* @__PURE__ */ M(t, {
570
570
  title: "Migration",
@@ -596,15 +596,15 @@ var L = ".imscc,.zip,application/zip", R = [
596
596
  role: "tabpanel",
597
597
  "aria-label": r(e),
598
598
  children: [
599
- e === "import" && /* @__PURE__ */ M(K, {}),
600
- e === "export" && /* @__PURE__ */ M(J, {}),
601
- e === "history" && /* @__PURE__ */ M(Z, {})
599
+ e === "import" && /* @__PURE__ */ M(q, {}),
600
+ e === "export" && /* @__PURE__ */ M(Y, {}),
601
+ e === "history" && /* @__PURE__ */ M(Q, {})
602
602
  ]
603
603
  })]
604
604
  })
605
605
  });
606
606
  };
607
607
  //#endregion
608
- export { Q as MigrationCenterPage };
608
+ export { $ as MigrationCenterPage };
609
609
 
610
610
  //# sourceMappingURL=MigrationCenterPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationCenterPage.js","names":[],"sources":["../../../../src/buildmyiq/pages/migration/MigrationCenterPage.tsx"],"sourcesContent":["/**\n * MigrationCenterPage — move courses in from other LMSs and out to open formats (BOFF-4437).\n * @module buildmyiq/pages/migration\n *\n * Three tabs:\n * - Import: upload an IMS Common Cartridge (.imscc) exported from Canvas,\n * Blackboard Learn, Moodle, Brightspace or Schoology, review what will be\n * created (and every skipped or converted item), then import it as a new\n * draft course.\n * - Export: download a course as Common Cartridge 1.1 or BuildMyIQ JSON, or\n * its gradebook as CSV.\n * - History: the migration audit trail, with the issues of every run.\n */\n\nimport type { ChangeEvent, FC } from 'react';\nimport { useId, useRef, useState } from 'react';\nimport {\n AlertTriangle,\n ArrowRightLeft,\n CheckCircle2,\n Download,\n FileArchive,\n History,\n Info,\n Upload,\n XCircle,\n} from 'lucide-react';\nimport { Button, GlassCard, Input } from '@burdenoff/fe-libs/ui';\n\nimport {\n EmptyState,\n ErrorView,\n LoadingView,\n PageLayout,\n StatusBadge,\n Tabs,\n} from '../../components';\nimport { BuiPermissionButton } from '../../components/BuiPermissionButton';\nimport { useBuildmyiq } from '../../context';\nimport { useBuiCourses, useBuiFileUpload } from '../../hooks';\nimport {\n type BuiCourseExportFormat,\n type BuiCourseImportPreview,\n type BuiMigrationIssue,\n type BuiMigrationJob,\n MIGRATION_JOBS_PAGE_SIZE,\n saveExport,\n useBuiExportCourse,\n useBuiExportGradebook,\n useBuiImportCourse,\n useBuiMigrationJobs,\n useBuiPreviewCourseImport,\n} from '../../hooks/useBuiMigration';\nimport { formatDateTime, formatEnumLabel } from '../../utils/formatters';\nimport { Field, SelectField } from '../authoring/_forms';\n\ntype MigrationTab = 'import' | 'export' | 'history';\n\nconst ACCEPTED_PACKAGES = '.imscc,.zip,application/zip';\n\nconst SOURCE_STEPS: Array<{ lms: string; steps: string }> = [\n {\n lms: 'Canvas',\n steps:\n 'Settings → Export Course Content → Course → Create Export, then download the .imscc file.',\n },\n {\n lms: 'Blackboard Learn',\n steps:\n 'Course Management → Packages and Utilities → Export/Archive Course → Export to Common Cartridge.',\n },\n {\n lms: 'Moodle',\n steps:\n 'Use an IMS Common Cartridge export of the course (Moodle backups, .mbz, are not read yet).',\n },\n {\n lms: 'Brightspace (D2L)',\n steps: 'Course Admin → Import/Export/Copy Components → Export as Common Cartridge.',\n },\n];\n\nconst formatBytes = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`;\n};\n\nconst errorMessage = (error: unknown, fallback: string): string =>\n error instanceof Error && error.message ? error.message : fallback;\n\nconst severityIcon = (severity: BuiMigrationIssue['severity']) => {\n if (severity === 'ERROR')\n return <XCircle aria-hidden=\"true\" className=\"h-4 w-4 shrink-0 text-status-error-text\" />;\n if (severity === 'WARNING')\n return (\n <AlertTriangle aria-hidden=\"true\" className=\"h-4 w-4 shrink-0 text-status-warning-text\" />\n );\n return <Info aria-hidden=\"true\" className=\"h-4 w-4 shrink-0 text-text-tertiary\" />;\n};\n\nconst SEVERITY_ORDER: Record<BuiMigrationIssue['severity'], number> = {\n ERROR: 0,\n WARNING: 1,\n INFO: 2,\n};\n\n/** Issues sorted by severity, each with its icon, message and package reference. */\nconst IssueList: FC<{ issues: BuiMigrationIssue[]; emptyText?: string }> = ({\n issues,\n emptyText,\n}) => {\n if (issues.length === 0) {\n return emptyText ? <p className=\"text-sm text-text-secondary\">{emptyText}</p> : null;\n }\n const sorted = [...issues].sort(\n (a, b) => SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity]\n );\n return (\n <ul className=\"flex flex-col gap-2\" aria-label=\"Migration issues\">\n {sorted.map((issue, index) => (\n <li key={`${issue.code}-${index}`} className=\"flex items-start gap-2 text-sm\">\n {severityIcon(issue.severity)}\n <span className=\"min-w-0\">\n <span className=\"sr-only\">{formatEnumLabel(issue.severity)}: </span>\n <span className=\"text-text-primary\">{issue.message}</span>\n {issue.ref && (\n <span className=\"ms-1 break-all font-mono text-xs text-text-tertiary\">\n ({issue.ref})\n </span>\n )}\n </span>\n </li>\n ))}\n </ul>\n );\n};\n\nconst StatTile: FC<{ label: string; value: number }> = ({ label, value }) => (\n <div className=\"rounded-lg border border-border-seam bg-bg-sunken px-3 py-2\">\n <dt className=\"text-xs text-text-tertiary\">{label}</dt>\n <dd className=\"text-lg font-semibold text-text-primary\">{value}</dd>\n </div>\n);\n\nconst PreviewCard: FC<{\n preview: BuiCourseImportPreview;\n fileId: string;\n onReset: () => void;\n}> = ({ preview, fileId, onReset }) => {\n const { navigateTo } = useBuildmyiq();\n const importCourse = useBuiImportCourse();\n const [title, setTitle] = useState(preview.title);\n const [error, setError] = useState<string | null>(null);\n const titleId = useId();\n\n const handleImport = async () => {\n setError(null);\n try {\n await importCourse.mutateAsync({ fileId, title: title.trim() || undefined });\n } catch (e) {\n setError(errorMessage(e, 'The course could not be imported.'));\n }\n };\n\n const imported = importCourse.data;\n if (imported) {\n return (\n <GlassCard\n treatment=\"plain\"\n className=\"flex flex-col gap-3 p-4\"\n data-testid=\"migration-import-done\"\n >\n <div className=\"flex items-center gap-2\">\n <CheckCircle2 aria-hidden=\"true\" className=\"h-5 w-5 text-status-success-text\" />\n <h2 className=\"font-semibold text-text-primary\">Imported “{imported.course.title}”</h2>\n </div>\n <p className=\"text-sm text-text-secondary\" role=\"status\">\n Created a draft course with {imported.job.stats.moduleCount} modules,{' '}\n {imported.job.stats.lessonCount} lessons and {imported.job.stats.assessmentCount} quizzes.\n Review it, attach any media the package referenced, and publish when it is ready.\n </p>\n <div className=\"flex flex-wrap gap-2\">\n <Button onClick={() => navigateTo(`authoring/${imported.course.id}`)}>\n Open in course builder\n </Button>\n <Button variant=\"outline\" onClick={onReset}>\n Import another package\n </Button>\n </div>\n </GlassCard>\n );\n }\n\n return (\n <GlassCard\n treatment=\"plain\"\n className=\"flex flex-col gap-4 p-4\"\n data-testid=\"migration-preview\"\n >\n <div className=\"flex flex-wrap items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <h2 className=\"font-semibold text-text-primary\">Review the import</h2>\n <p className=\"text-sm text-text-secondary\">\n {preview.fileName}\n {preview.sourceSystem ? ` · exported from ${preview.sourceSystem}` : ''}\n {preview.standardVersion ? ` · Common Cartridge ${preview.standardVersion}` : ''}\n {` · ${formatBytes(preview.stats.byteSize)}`}\n </p>\n </div>\n <Button variant=\"ghost\" size=\"sm\" onClick={onReset}>\n Choose another file\n </Button>\n </div>\n\n <dl className=\"grid grid-cols-2 gap-2 sm:grid-cols-5\">\n <StatTile label=\"Modules\" value={preview.stats.moduleCount} />\n <StatTile label=\"Lessons\" value={preview.stats.lessonCount} />\n <StatTile label=\"Quizzes\" value={preview.stats.assessmentCount} />\n <StatTile label=\"Questions\" value={preview.stats.questionCount} />\n <StatTile label=\"Skipped items\" value={preview.stats.skippedCount} />\n </dl>\n\n {preview.modules.length > 0 && (\n <section aria-labelledby={`${titleId}-outline`} className=\"flex flex-col gap-2\">\n <h3 id={`${titleId}-outline`} className=\"text-sm font-semibold text-text-primary\">\n Course outline\n </h3>\n <ol className=\"flex flex-col gap-2\">\n {preview.modules.map((module, moduleIndex) => (\n <li\n key={`${module.title}-${moduleIndex}`}\n className=\"rounded-lg border border-border-seam p-3\"\n >\n <p className=\"text-sm font-medium text-text-primary\">{module.title}</p>\n <ul className=\"mt-1 flex flex-col gap-0.5\">\n {module.items.map((item, itemIndex) => (\n <li\n key={`${item.title}-${itemIndex}`}\n className=\"flex flex-wrap items-center justify-between gap-2 text-sm text-text-secondary\"\n >\n <span className=\"min-w-0 truncate\">{item.title}</span>\n <span className=\"text-xs text-text-tertiary\">\n {item.kind === 'ASSESSMENT'\n ? `Quiz · ${item.detail}`\n : formatEnumLabel(item.detail)}\n </span>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ol>\n </section>\n )}\n\n <section aria-labelledby={`${titleId}-issues`} className=\"flex flex-col gap-2\">\n <h3 id={`${titleId}-issues`} className=\"text-sm font-semibold text-text-primary\">\n What will not come across as-is\n </h3>\n <IssueList issues={preview.issues} emptyText=\"Everything in the package can be imported.\" />\n </section>\n\n {preview.canImport ? (\n <div className=\"flex flex-col gap-3 border-t border-border-seam pt-4\">\n <Field label=\"Course title\" htmlFor={`${titleId}-title`}>\n <Input\n id={`${titleId}-title`}\n value={title}\n maxLength={255}\n onChange={(e) => setTitle(e.target.value)}\n />\n </Field>\n {error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n )}\n <div>\n <BuiPermissionButton resource=\"buildmyiq-course\" action=\"create\">\n <Button\n onClick={handleImport}\n disabled={importCourse.isPending}\n data-testid=\"migration-import-button\"\n >\n {importCourse.isPending ? 'Importing…' : 'Import as draft course'}\n </Button>\n </BuiPermissionButton>\n </div>\n </div>\n ) : (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n This package cannot be imported. Fix the error above and upload it again.\n </p>\n )}\n </GlassCard>\n );\n};\n\nconst ImportTab: FC = () => {\n const fileInput = useRef<HTMLInputElement>(null);\n const { upload, isUploading, progress } = useBuiFileUpload({ visibility: 'PRIVATE' });\n const previewImport = useBuiPreviewCourseImport();\n const [fileId, setFileId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const inputId = useId();\n\n const reset = () => {\n setFileId(null);\n setError(null);\n previewImport.reset();\n if (fileInput.current) fileInput.current.value = '';\n };\n\n const handleFile = async (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (!file) return;\n setError(null);\n previewImport.reset();\n try {\n const uploaded = await upload(file);\n setFileId(uploaded.fileId);\n await previewImport.mutateAsync(uploaded.fileId);\n } catch (e) {\n setError(errorMessage(e, 'The package could not be read.'));\n }\n };\n\n const busy = isUploading || previewImport.isPending;\n\n return (\n <div className=\"flex flex-col gap-4\">\n <GlassCard treatment=\"plain\" className=\"flex flex-col gap-3 p-4\">\n <div>\n <h2 className=\"font-semibold text-text-primary\">Import a course from another LMS</h2>\n <p className=\"text-sm text-text-secondary\">\n Upload an IMS Common Cartridge (.imscc) package. Pages, links, discussions, assignments\n and quizzes become a draft course; nothing is published until you choose to.\n </p>\n </div>\n <ul className=\"grid gap-2 sm:grid-cols-2\">\n {SOURCE_STEPS.map((source) => (\n <li key={source.lms} className=\"rounded-lg border border-border-seam p-3 text-sm\">\n <p className=\"font-medium text-text-primary\">{source.lms}</p>\n <p className=\"text-text-secondary\">{source.steps}</p>\n </li>\n ))}\n </ul>\n <div className=\"flex flex-wrap items-center gap-3\">\n <input\n ref={fileInput}\n id={inputId}\n type=\"file\"\n accept={ACCEPTED_PACKAGES}\n className=\"sr-only\"\n onChange={handleFile}\n disabled={busy}\n data-testid=\"migration-file-input\"\n />\n <BuiPermissionButton resource=\"buildmyiq-course\" action=\"create\">\n <Button onClick={() => fileInput.current?.click()} disabled={busy}>\n <Upload aria-hidden=\"true\" className=\"me-1.5 h-4 w-4\" />\n {isUploading\n ? `Uploading… ${progress}%`\n : previewImport.isPending\n ? 'Reading package…'\n : 'Choose a .imscc package'}\n </Button>\n </BuiPermissionButton>\n <label htmlFor={inputId} className=\"text-xs text-text-tertiary\">\n Up to 50 MB. The file is stored privately and only you can import it.\n </label>\n </div>\n {error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n )}\n </GlassCard>\n\n {previewImport.data && fileId && (\n <PreviewCard key={fileId} preview={previewImport.data} fileId={fileId} onReset={reset} />\n )}\n </div>\n );\n};\n\nconst EXPORT_FORMATS: Array<{ value: BuiCourseExportFormat; label: string }> = [\n { value: 'COMMON_CARTRIDGE', label: 'IMS Common Cartridge 1.1 (.imscc)' },\n { value: 'BUILDMYIQ_JSON', label: 'BuildMyIQ course JSON (.json)' },\n];\n\nconst ExportTab: FC = () => {\n const courses = useBuiCourses({ limit: 100 });\n const exportCourse = useBuiExportCourse();\n const exportGradebook = useBuiExportGradebook();\n const [courseId, setCourseId] = useState('');\n const [format, setFormat] = useState<BuiCourseExportFormat>('COMMON_CARTRIDGE');\n const [message, setMessage] = useState<{ kind: 'ok' | 'error'; text: string } | null>(null);\n const courseFieldId = useId();\n const formatFieldId = useId();\n\n const items = courses.data?.items ?? [];\n const busy = exportCourse.isPending || exportGradebook.isPending;\n\n const run = async (kind: 'course' | 'gradebook') => {\n if (!courseId) return;\n setMessage(null);\n try {\n const exported =\n kind === 'course'\n ? await exportCourse.mutateAsync({ courseId, format })\n : await exportGradebook.mutateAsync(courseId);\n saveExport(exported);\n setMessage({\n kind: 'ok',\n text: `Downloaded ${exported.fileName} (${formatBytes(exported.byteSize)}).`,\n });\n } catch (e) {\n setMessage({ kind: 'error', text: errorMessage(e, 'The export failed.') });\n }\n };\n\n if (courses.isLoading) return <LoadingView label=\"Loading courses…\" />;\n if (courses.isError)\n return <ErrorView message=\"We couldn't load your courses.\" onRetry={() => courses.refetch()} />;\n if (items.length === 0) {\n return (\n <EmptyState\n illustration=\"empty-data\"\n icon={<FileArchive className=\"h-10 w-10\" />}\n title=\"No courses to export\"\n description=\"Create or import a course first.\"\n />\n );\n }\n\n return (\n <GlassCard treatment=\"plain\" className=\"flex flex-col gap-4 p-4\">\n <div>\n <h2 className=\"font-semibold text-text-primary\">Export a course</h2>\n <p className=\"text-sm text-text-secondary\">\n Common Cartridge opens in Canvas, Blackboard, Moodle and Brightspace. The JSON export\n keeps every BuildMyIQ field. Exports include quiz answer keys, so keep them private. The\n gradebook CSV lists each enrollment with its progress and best quiz scores.\n </p>\n </div>\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <Field label=\"Course\" htmlFor={courseFieldId} required>\n <SelectField\n id={courseFieldId}\n value={courseId}\n onChange={setCourseId}\n placeholder=\"Choose a course\"\n options={items.map((course) => ({ value: course.id, label: course.title }))}\n />\n </Field>\n <Field label=\"Course format\" htmlFor={formatFieldId}>\n <SelectField\n id={formatFieldId}\n value={format}\n onChange={(value) => setFormat(value as BuiCourseExportFormat)}\n options={EXPORT_FORMATS}\n />\n </Field>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n <BuiPermissionButton resource=\"buildmyiq-course\" action=\"update\">\n <Button\n onClick={() => run('course')}\n disabled={!courseId || busy}\n data-testid=\"migration-export-course\"\n >\n <Download aria-hidden=\"true\" className=\"me-1.5 h-4 w-4\" />\n {exportCourse.isPending ? 'Exporting…' : 'Export course'}\n </Button>\n </BuiPermissionButton>\n <BuiPermissionButton resource=\"buildmyiq-submission\" action=\"list\">\n <Button\n variant=\"outline\"\n onClick={() => run('gradebook')}\n disabled={!courseId || busy}\n data-testid=\"migration-export-gradebook\"\n >\n <Download aria-hidden=\"true\" className=\"me-1.5 h-4 w-4\" />\n {exportGradebook.isPending ? 'Exporting…' : 'Export gradebook (CSV)'}\n </Button>\n </BuiPermissionButton>\n </div>\n {message && (\n <p\n role={message.kind === 'error' ? 'alert' : 'status'}\n className={\n message.kind === 'error'\n ? 'text-sm text-status-error-text'\n : 'text-sm text-text-secondary'\n }\n >\n {message.text}\n </p>\n )}\n </GlassCard>\n );\n};\n\nconst KIND_LABEL: Record<BuiMigrationJob['kind'], string> = {\n COURSE_IMPORT: 'Course import',\n COURSE_EXPORT: 'Course export',\n GRADEBOOK_EXPORT: 'Gradebook export',\n};\n\nconst JobRow: FC<{ job: BuiMigrationJob }> = ({ job }) => {\n const [open, setOpen] = useState(false);\n const detailsId = useId();\n const counts =\n job.kind === 'GRADEBOOK_EXPORT'\n ? `${job.stats.rowCount} rows`\n : `${job.stats.moduleCount} modules · ${job.stats.lessonCount} lessons · ${job.stats.assessmentCount} quizzes`;\n return (\n <li className=\"rounded-lg border border-border-seam p-3\" data-testid=\"migration-job\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <p className=\"flex flex-wrap items-center gap-2 text-sm font-medium text-text-primary\">\n {KIND_LABEL[job.kind]}\n <StatusBadge status={job.status} />\n <span className=\"text-xs font-normal text-text-tertiary\">\n {formatEnumLabel(job.format)}\n </span>\n </p>\n <p className=\"truncate text-sm text-text-secondary\">\n {job.courseTitle ?? job.fileName ?? 'Untitled'}\n {job.sourceSystem ? ` · from ${job.sourceSystem}` : ''} · {counts}\n </p>\n <p className=\"text-xs text-text-tertiary\">{formatDateTime(job.createdAt)}</p>\n </div>\n {job.issues.length > 0 && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n aria-expanded={open}\n aria-controls={detailsId}\n onClick={() => setOpen((v) => !v)}\n >\n {open ? 'Hide' : 'Show'} {job.issues.length} note{job.issues.length === 1 ? '' : 's'}\n </Button>\n )}\n </div>\n {open && (\n <div id={detailsId} className=\"mt-3 border-t border-border-seam pt-3\">\n <IssueList issues={job.issues} />\n </div>\n )}\n </li>\n );\n};\n\nconst HistoryTab: FC = () => {\n const [offset, setOffset] = useState(0);\n const jobs = useBuiMigrationJobs(offset);\n if (jobs.isLoading) return <LoadingView label=\"Loading migration history…\" />;\n if (jobs.isError)\n return (\n <ErrorView message=\"We couldn't load the migration history.\" onRetry={() => jobs.refetch()} />\n );\n const items = jobs.data?.items ?? [];\n if (items.length === 0 && offset === 0) {\n return (\n <EmptyState\n illustration=\"empty-data\"\n icon={<History className=\"h-10 w-10\" />}\n title=\"No migrations yet\"\n description=\"Imports and exports appear here with everything that was skipped or converted.\"\n />\n );\n }\n return (\n <div className=\"flex flex-col gap-3\">\n <ul className=\"flex flex-col gap-2\" aria-label=\"Migration history\">\n {items.map((job) => (\n <JobRow key={job.id} job={job} />\n ))}\n </ul>\n <div className=\"flex justify-between\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={offset === 0}\n onClick={() => setOffset(Math.max(0, offset - MIGRATION_JOBS_PAGE_SIZE))}\n >\n Newer\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!jobs.data?.pageInfo.hasMore}\n onClick={() => setOffset(offset + MIGRATION_JOBS_PAGE_SIZE)}\n >\n Older\n </Button>\n </div>\n </div>\n );\n};\n\nexport const MigrationCenterPage: FC = () => {\n const [tab, setTab] = useState<MigrationTab>('import');\n return (\n <PageLayout\n title=\"Migration\"\n description=\"Bring courses over from Canvas, Blackboard, Moodle and other LMSs with IMS Common Cartridge, and export courses and gradebooks in open formats.\"\n titleGradient\n >\n <div className=\"flex flex-col gap-4\">\n <Tabs<MigrationTab>\n value={tab}\n onChange={setTab}\n items={[\n { value: 'import', label: 'Import', icon: <Upload className=\"h-4 w-4\" /> },\n { value: 'export', label: 'Export', icon: <ArrowRightLeft className=\"h-4 w-4\" /> },\n { value: 'history', label: 'History', icon: <History className=\"h-4 w-4\" /> },\n ]}\n />\n <div role=\"tabpanel\" aria-label={formatEnumLabel(tab)}>\n {tab === 'import' && <ImportTab />}\n {tab === 'export' && <ExportTab />}\n {tab === 'history' && <HistoryTab />}\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0DA,IAAM,IAAoB,+BAEpB,IAAsD;CAC1D;EACE,KAAK;EACL,OACE;CACJ;CACA;EACE,KAAK;EACL,OACE;CACJ;CACA;EACE,KAAK;EACL,OACE;CACJ;CACA;EACE,KAAK;EACL,OAAO;CACT;AACF,GAEM,KAAe,MACf,IAAQ,OAAa,GAAG,EAAM,MAC9B,IAAQ,OAAO,OAAa,IAAI,IAAQ,KAAA,CAAM,QAAQ,CAAC,EAAE,OACtD,IAAI,IAAQ,OAAO,KAAA,CAAM,QAAQ,CAAC,EAAE,MAGvC,KAAgB,GAAgB,MACpC,aAAiB,SAAS,EAAM,UAAU,EAAM,UAAU,GAEtD,KAAgB,MAChB,MAAa,UACR,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AAW,CAAA;KAAE;IAC9E;GACD,CAAA,GACD,kBAAC,OAAD;IAAK,MAAK;IAAW,cAAY,EAAgB,CAAG;cAApD;KACG,MAAQ,YAAY,kBAAC,GAAD,CAAY,CAAA;KAChC,MAAQ,YAAY,kBAAC,GAAD,CAAY,CAAA;KAChC,MAAQ,aAAa,kBAAC,GAAD,CAAa,CAAA;IAChC;KACF;;CACK,CAAA;AAEhB"}
1
+ {"version":3,"file":"MigrationCenterPage.js","names":[],"sources":["../../../../src/buildmyiq/pages/migration/MigrationCenterPage.tsx"],"sourcesContent":["/**\n * MigrationCenterPage — move courses in from other LMSs and out to open formats (BOFF-4437).\n * @module buildmyiq/pages/migration\n *\n * Three tabs:\n * - Import: upload an IMS Common Cartridge (.imscc) exported from Canvas,\n * Blackboard Learn, Moodle, Brightspace or Schoology, or a native Moodle\n * course backup (.mbz, BOFF-10577), review what will be created (and\n * every skipped or converted item), then import it as a new draft course.\n * - Export: download a course as Common Cartridge 1.1 or BuildMyIQ JSON, or\n * its gradebook as CSV.\n * - History: the migration audit trail, with the issues of every run.\n */\n\nimport type { ChangeEvent, FC } from 'react';\nimport { useId, useRef, useState } from 'react';\nimport {\n AlertTriangle,\n ArrowRightLeft,\n CheckCircle2,\n Download,\n FileArchive,\n History,\n Info,\n Upload,\n XCircle,\n} from 'lucide-react';\nimport { Button, GlassCard, Input } from '@burdenoff/fe-libs/ui';\n\nimport {\n EmptyState,\n ErrorView,\n LoadingView,\n PageLayout,\n StatusBadge,\n Tabs,\n} from '../../components';\nimport { BuiPermissionButton } from '../../components/BuiPermissionButton';\nimport { useBuildmyiq } from '../../context';\nimport { useBuiCourses, useBuiFileUpload } from '../../hooks';\nimport {\n type BuiCourseExportFormat,\n type BuiCourseImportPreview,\n type BuiMigrationIssue,\n type BuiMigrationJob,\n MIGRATION_JOBS_PAGE_SIZE,\n saveExport,\n useBuiExportCourse,\n useBuiExportGradebook,\n useBuiImportCourse,\n useBuiMigrationJobs,\n useBuiPreviewCourseImport,\n} from '../../hooks/useBuiMigration';\nimport { formatDateTime, formatEnumLabel } from '../../utils/formatters';\nimport { Field, SelectField } from '../authoring/_forms';\n\ntype MigrationTab = 'import' | 'export' | 'history';\n\nconst ACCEPTED_PACKAGES =\n '.imscc,.zip,.mbz,application/zip,application/gzip,application/x-gzip,application/vnd.moodle.backup';\n\nconst SOURCE_STEPS: Array<{ lms: string; steps: string }> = [\n {\n lms: 'Canvas',\n steps:\n 'Settings → Export Course Content → Course → Create Export, then download the .imscc file.',\n },\n {\n lms: 'Blackboard Learn',\n steps:\n 'Course Management → Packages and Utilities → Export/Archive Course → Export to Common Cartridge.',\n },\n {\n lms: 'Moodle',\n steps:\n 'Course → Backup, keep the defaults (no user data needed), then download the .mbz file. A Common Cartridge export works too.',\n },\n {\n lms: 'Brightspace (D2L)',\n steps: 'Course Admin → Import/Export/Copy Components → Export as Common Cartridge.',\n },\n];\n\nconst formatBytes = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`;\n};\n\n/** \"Moodle backup (Moodle 4.1.2)\" / \"Common Cartridge 1.1.0\" for the preview header. */\nconst packageLabel = (preview: BuiCourseImportPreview): string => {\n if (preview.format === 'MOODLE_BACKUP') {\n return preview.standardVersion\n ? `Moodle backup (Moodle ${preview.standardVersion})`\n : 'Moodle backup';\n }\n return preview.standardVersion\n ? `Common Cartridge ${preview.standardVersion}`\n : 'Common Cartridge';\n};\n\nconst errorMessage = (error: unknown, fallback: string): string =>\n error instanceof Error && error.message ? error.message : fallback;\n\nconst severityIcon = (severity: BuiMigrationIssue['severity']) => {\n if (severity === 'ERROR')\n return <XCircle aria-hidden=\"true\" className=\"h-4 w-4 shrink-0 text-status-error-text\" />;\n if (severity === 'WARNING')\n return (\n <AlertTriangle aria-hidden=\"true\" className=\"h-4 w-4 shrink-0 text-status-warning-text\" />\n );\n return <Info aria-hidden=\"true\" className=\"h-4 w-4 shrink-0 text-text-tertiary\" />;\n};\n\nconst SEVERITY_ORDER: Record<BuiMigrationIssue['severity'], number> = {\n ERROR: 0,\n WARNING: 1,\n INFO: 2,\n};\n\n/** Issues sorted by severity, each with its icon, message and package reference. */\nconst IssueList: FC<{ issues: BuiMigrationIssue[]; emptyText?: string }> = ({\n issues,\n emptyText,\n}) => {\n if (issues.length === 0) {\n return emptyText ? <p className=\"text-sm text-text-secondary\">{emptyText}</p> : null;\n }\n const sorted = [...issues].sort(\n (a, b) => SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity]\n );\n return (\n <ul className=\"flex flex-col gap-2\" aria-label=\"Migration issues\">\n {sorted.map((issue, index) => (\n <li key={`${issue.code}-${index}`} className=\"flex items-start gap-2 text-sm\">\n {severityIcon(issue.severity)}\n <span className=\"min-w-0\">\n <span className=\"sr-only\">{formatEnumLabel(issue.severity)}: </span>\n <span className=\"text-text-primary\">{issue.message}</span>\n {issue.ref && (\n <span className=\"ms-1 break-all font-mono text-xs text-text-tertiary\">\n ({issue.ref})\n </span>\n )}\n </span>\n </li>\n ))}\n </ul>\n );\n};\n\nconst StatTile: FC<{ label: string; value: number }> = ({ label, value }) => (\n <div className=\"rounded-lg border border-border-seam bg-bg-sunken px-3 py-2\">\n <dt className=\"text-xs text-text-tertiary\">{label}</dt>\n <dd className=\"text-lg font-semibold text-text-primary\">{value}</dd>\n </div>\n);\n\nconst PreviewCard: FC<{\n preview: BuiCourseImportPreview;\n fileId: string;\n onReset: () => void;\n}> = ({ preview, fileId, onReset }) => {\n const { navigateTo } = useBuildmyiq();\n const importCourse = useBuiImportCourse();\n const [title, setTitle] = useState(preview.title);\n const [error, setError] = useState<string | null>(null);\n const titleId = useId();\n\n const handleImport = async () => {\n setError(null);\n try {\n await importCourse.mutateAsync({ fileId, title: title.trim() || undefined });\n } catch (e) {\n setError(errorMessage(e, 'The course could not be imported.'));\n }\n };\n\n const imported = importCourse.data;\n if (imported) {\n return (\n <GlassCard\n treatment=\"plain\"\n className=\"flex flex-col gap-3 p-4\"\n data-testid=\"migration-import-done\"\n >\n <div className=\"flex items-center gap-2\">\n <CheckCircle2 aria-hidden=\"true\" className=\"h-5 w-5 text-status-success-text\" />\n <h2 className=\"font-semibold text-text-primary\">Imported “{imported.course.title}”</h2>\n </div>\n <p className=\"text-sm text-text-secondary\" role=\"status\">\n Created a draft course with {imported.job.stats.moduleCount} modules,{' '}\n {imported.job.stats.lessonCount} lessons and {imported.job.stats.assessmentCount} quizzes.\n Review it, attach any media the package referenced, and publish when it is ready.\n </p>\n <div className=\"flex flex-wrap gap-2\">\n <Button onClick={() => navigateTo(`authoring/${imported.course.id}`)}>\n Open in course builder\n </Button>\n <Button variant=\"outline\" onClick={onReset}>\n Import another package\n </Button>\n </div>\n </GlassCard>\n );\n }\n\n return (\n <GlassCard\n treatment=\"plain\"\n className=\"flex flex-col gap-4 p-4\"\n data-testid=\"migration-preview\"\n >\n <div className=\"flex flex-wrap items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <h2 className=\"font-semibold text-text-primary\">Review the import</h2>\n <p className=\"text-sm text-text-secondary\">\n {preview.fileName}\n {preview.sourceSystem ? ` · exported from ${preview.sourceSystem}` : ''}\n {` · ${packageLabel(preview)}`}\n {` · ${formatBytes(preview.stats.byteSize)}`}\n </p>\n </div>\n <Button variant=\"ghost\" size=\"sm\" onClick={onReset}>\n Choose another file\n </Button>\n </div>\n\n <dl className=\"grid grid-cols-2 gap-2 sm:grid-cols-5\">\n <StatTile label=\"Modules\" value={preview.stats.moduleCount} />\n <StatTile label=\"Lessons\" value={preview.stats.lessonCount} />\n <StatTile label=\"Quizzes\" value={preview.stats.assessmentCount} />\n <StatTile label=\"Questions\" value={preview.stats.questionCount} />\n <StatTile label=\"Skipped items\" value={preview.stats.skippedCount} />\n </dl>\n\n {preview.modules.length > 0 && (\n <section aria-labelledby={`${titleId}-outline`} className=\"flex flex-col gap-2\">\n <h3 id={`${titleId}-outline`} className=\"text-sm font-semibold text-text-primary\">\n Course outline\n </h3>\n <ol className=\"flex flex-col gap-2\">\n {preview.modules.map((module, moduleIndex) => (\n <li\n key={`${module.title}-${moduleIndex}`}\n className=\"rounded-lg border border-border-seam p-3\"\n >\n <p className=\"text-sm font-medium text-text-primary\">{module.title}</p>\n <ul className=\"mt-1 flex flex-col gap-0.5\">\n {module.items.map((item, itemIndex) => (\n <li\n key={`${item.title}-${itemIndex}`}\n className=\"flex flex-wrap items-center justify-between gap-2 text-sm text-text-secondary\"\n >\n <span className=\"min-w-0 truncate\">{item.title}</span>\n <span className=\"text-xs text-text-tertiary\">\n {item.kind === 'ASSESSMENT'\n ? `Quiz · ${item.detail}`\n : formatEnumLabel(item.detail)}\n </span>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ol>\n </section>\n )}\n\n <section aria-labelledby={`${titleId}-issues`} className=\"flex flex-col gap-2\">\n <h3 id={`${titleId}-issues`} className=\"text-sm font-semibold text-text-primary\">\n What will not come across as-is\n </h3>\n <IssueList issues={preview.issues} emptyText=\"Everything in the package can be imported.\" />\n </section>\n\n {preview.canImport ? (\n <div className=\"flex flex-col gap-3 border-t border-border-seam pt-4\">\n <Field label=\"Course title\" htmlFor={`${titleId}-title`}>\n <Input\n id={`${titleId}-title`}\n value={title}\n maxLength={255}\n onChange={(e) => setTitle(e.target.value)}\n />\n </Field>\n {error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n )}\n <div>\n <BuiPermissionButton resource=\"buildmyiq-course\" action=\"create\">\n <Button\n onClick={handleImport}\n disabled={importCourse.isPending}\n data-testid=\"migration-import-button\"\n >\n {importCourse.isPending ? 'Importing…' : 'Import as draft course'}\n </Button>\n </BuiPermissionButton>\n </div>\n </div>\n ) : (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n This package cannot be imported. Fix the error above and upload it again.\n </p>\n )}\n </GlassCard>\n );\n};\n\nconst ImportTab: FC = () => {\n const fileInput = useRef<HTMLInputElement>(null);\n const { upload, isUploading, progress } = useBuiFileUpload({ visibility: 'PRIVATE' });\n const previewImport = useBuiPreviewCourseImport();\n const [fileId, setFileId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const inputId = useId();\n\n const reset = () => {\n setFileId(null);\n setError(null);\n previewImport.reset();\n if (fileInput.current) fileInput.current.value = '';\n };\n\n const handleFile = async (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (!file) return;\n setError(null);\n previewImport.reset();\n try {\n const uploaded = await upload(file);\n setFileId(uploaded.fileId);\n await previewImport.mutateAsync(uploaded.fileId);\n } catch (e) {\n setError(errorMessage(e, 'The package could not be read.'));\n }\n };\n\n const busy = isUploading || previewImport.isPending;\n\n return (\n <div className=\"flex flex-col gap-4\">\n <GlassCard treatment=\"plain\" className=\"flex flex-col gap-3 p-4\">\n <div>\n <h2 className=\"font-semibold text-text-primary\">Import a course from another LMS</h2>\n <p className=\"text-sm text-text-secondary\">\n Upload an IMS Common Cartridge (.imscc) package or a Moodle course backup (.mbz). Pages,\n links, discussions, assignments and quizzes become a draft course; nothing is published\n until you choose to.\n </p>\n </div>\n <ul className=\"grid gap-2 sm:grid-cols-2\">\n {SOURCE_STEPS.map((source) => (\n <li key={source.lms} className=\"rounded-lg border border-border-seam p-3 text-sm\">\n <p className=\"font-medium text-text-primary\">{source.lms}</p>\n <p className=\"text-text-secondary\">{source.steps}</p>\n </li>\n ))}\n </ul>\n <div className=\"flex flex-wrap items-center gap-3\">\n <input\n ref={fileInput}\n id={inputId}\n type=\"file\"\n accept={ACCEPTED_PACKAGES}\n className=\"sr-only\"\n onChange={handleFile}\n disabled={busy}\n data-testid=\"migration-file-input\"\n />\n <BuiPermissionButton resource=\"buildmyiq-course\" action=\"create\">\n <Button onClick={() => fileInput.current?.click()} disabled={busy}>\n <Upload aria-hidden=\"true\" className=\"me-1.5 h-4 w-4\" />\n {isUploading\n ? `Uploading… ${progress}%`\n : previewImport.isPending\n ? 'Reading package…'\n : 'Choose a .imscc or .mbz file'}\n </Button>\n </BuiPermissionButton>\n <label htmlFor={inputId} className=\"text-xs text-text-tertiary\">\n Up to 50 MB. The file is stored privately and only you can import it.\n </label>\n </div>\n {error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n )}\n </GlassCard>\n\n {previewImport.data && fileId && (\n <PreviewCard key={fileId} preview={previewImport.data} fileId={fileId} onReset={reset} />\n )}\n </div>\n );\n};\n\nconst EXPORT_FORMATS: Array<{ value: BuiCourseExportFormat; label: string }> = [\n { value: 'COMMON_CARTRIDGE', label: 'IMS Common Cartridge 1.1 (.imscc)' },\n { value: 'BUILDMYIQ_JSON', label: 'BuildMyIQ course JSON (.json)' },\n];\n\nconst ExportTab: FC = () => {\n const courses = useBuiCourses({ limit: 100 });\n const exportCourse = useBuiExportCourse();\n const exportGradebook = useBuiExportGradebook();\n const [courseId, setCourseId] = useState('');\n const [format, setFormat] = useState<BuiCourseExportFormat>('COMMON_CARTRIDGE');\n const [message, setMessage] = useState<{ kind: 'ok' | 'error'; text: string } | null>(null);\n const courseFieldId = useId();\n const formatFieldId = useId();\n\n const items = courses.data?.items ?? [];\n const busy = exportCourse.isPending || exportGradebook.isPending;\n\n const run = async (kind: 'course' | 'gradebook') => {\n if (!courseId) return;\n setMessage(null);\n try {\n const exported =\n kind === 'course'\n ? await exportCourse.mutateAsync({ courseId, format })\n : await exportGradebook.mutateAsync(courseId);\n saveExport(exported);\n setMessage({\n kind: 'ok',\n text: `Downloaded ${exported.fileName} (${formatBytes(exported.byteSize)}).`,\n });\n } catch (e) {\n setMessage({ kind: 'error', text: errorMessage(e, 'The export failed.') });\n }\n };\n\n if (courses.isLoading) return <LoadingView label=\"Loading courses…\" />;\n if (courses.isError)\n return <ErrorView message=\"We couldn't load your courses.\" onRetry={() => courses.refetch()} />;\n if (items.length === 0) {\n return (\n <EmptyState\n illustration=\"empty-data\"\n icon={<FileArchive className=\"h-10 w-10\" />}\n title=\"No courses to export\"\n description=\"Create or import a course first.\"\n />\n );\n }\n\n return (\n <GlassCard treatment=\"plain\" className=\"flex flex-col gap-4 p-4\">\n <div>\n <h2 className=\"font-semibold text-text-primary\">Export a course</h2>\n <p className=\"text-sm text-text-secondary\">\n Common Cartridge opens in Canvas, Blackboard, Moodle and Brightspace. The JSON export\n keeps every BuildMyIQ field. Exports include quiz answer keys, so keep them private. The\n gradebook CSV lists each enrollment with its progress and best quiz scores.\n </p>\n </div>\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <Field label=\"Course\" htmlFor={courseFieldId} required>\n <SelectField\n id={courseFieldId}\n value={courseId}\n onChange={setCourseId}\n placeholder=\"Choose a course\"\n options={items.map((course) => ({ value: course.id, label: course.title }))}\n />\n </Field>\n <Field label=\"Course format\" htmlFor={formatFieldId}>\n <SelectField\n id={formatFieldId}\n value={format}\n onChange={(value) => setFormat(value as BuiCourseExportFormat)}\n options={EXPORT_FORMATS}\n />\n </Field>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n <BuiPermissionButton resource=\"buildmyiq-course\" action=\"update\">\n <Button\n onClick={() => run('course')}\n disabled={!courseId || busy}\n data-testid=\"migration-export-course\"\n >\n <Download aria-hidden=\"true\" className=\"me-1.5 h-4 w-4\" />\n {exportCourse.isPending ? 'Exporting…' : 'Export course'}\n </Button>\n </BuiPermissionButton>\n <BuiPermissionButton resource=\"buildmyiq-submission\" action=\"list\">\n <Button\n variant=\"outline\"\n onClick={() => run('gradebook')}\n disabled={!courseId || busy}\n data-testid=\"migration-export-gradebook\"\n >\n <Download aria-hidden=\"true\" className=\"me-1.5 h-4 w-4\" />\n {exportGradebook.isPending ? 'Exporting…' : 'Export gradebook (CSV)'}\n </Button>\n </BuiPermissionButton>\n </div>\n {message && (\n <p\n role={message.kind === 'error' ? 'alert' : 'status'}\n className={\n message.kind === 'error'\n ? 'text-sm text-status-error-text'\n : 'text-sm text-text-secondary'\n }\n >\n {message.text}\n </p>\n )}\n </GlassCard>\n );\n};\n\nconst KIND_LABEL: Record<BuiMigrationJob['kind'], string> = {\n COURSE_IMPORT: 'Course import',\n COURSE_EXPORT: 'Course export',\n GRADEBOOK_EXPORT: 'Gradebook export',\n};\n\nconst JobRow: FC<{ job: BuiMigrationJob }> = ({ job }) => {\n const [open, setOpen] = useState(false);\n const detailsId = useId();\n const counts =\n job.kind === 'GRADEBOOK_EXPORT'\n ? `${job.stats.rowCount} rows`\n : `${job.stats.moduleCount} modules · ${job.stats.lessonCount} lessons · ${job.stats.assessmentCount} quizzes`;\n return (\n <li className=\"rounded-lg border border-border-seam p-3\" data-testid=\"migration-job\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <p className=\"flex flex-wrap items-center gap-2 text-sm font-medium text-text-primary\">\n {KIND_LABEL[job.kind]}\n <StatusBadge status={job.status} />\n <span className=\"text-xs font-normal text-text-tertiary\">\n {formatEnumLabel(job.format)}\n </span>\n </p>\n <p className=\"truncate text-sm text-text-secondary\">\n {job.courseTitle ?? job.fileName ?? 'Untitled'}\n {job.sourceSystem ? ` · from ${job.sourceSystem}` : ''} · {counts}\n </p>\n <p className=\"text-xs text-text-tertiary\">{formatDateTime(job.createdAt)}</p>\n </div>\n {job.issues.length > 0 && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n aria-expanded={open}\n aria-controls={detailsId}\n onClick={() => setOpen((v) => !v)}\n >\n {open ? 'Hide' : 'Show'} {job.issues.length} note{job.issues.length === 1 ? '' : 's'}\n </Button>\n )}\n </div>\n {open && (\n <div id={detailsId} className=\"mt-3 border-t border-border-seam pt-3\">\n <IssueList issues={job.issues} />\n </div>\n )}\n </li>\n );\n};\n\nconst HistoryTab: FC = () => {\n const [offset, setOffset] = useState(0);\n const jobs = useBuiMigrationJobs(offset);\n if (jobs.isLoading) return <LoadingView label=\"Loading migration history…\" />;\n if (jobs.isError)\n return (\n <ErrorView message=\"We couldn't load the migration history.\" onRetry={() => jobs.refetch()} />\n );\n const items = jobs.data?.items ?? [];\n if (items.length === 0 && offset === 0) {\n return (\n <EmptyState\n illustration=\"empty-data\"\n icon={<History className=\"h-10 w-10\" />}\n title=\"No migrations yet\"\n description=\"Imports and exports appear here with everything that was skipped or converted.\"\n />\n );\n }\n return (\n <div className=\"flex flex-col gap-3\">\n <ul className=\"flex flex-col gap-2\" aria-label=\"Migration history\">\n {items.map((job) => (\n <JobRow key={job.id} job={job} />\n ))}\n </ul>\n <div className=\"flex justify-between\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={offset === 0}\n onClick={() => setOffset(Math.max(0, offset - MIGRATION_JOBS_PAGE_SIZE))}\n >\n Newer\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!jobs.data?.pageInfo.hasMore}\n onClick={() => setOffset(offset + MIGRATION_JOBS_PAGE_SIZE)}\n >\n Older\n </Button>\n </div>\n </div>\n );\n};\n\nexport const MigrationCenterPage: FC = () => {\n const [tab, setTab] = useState<MigrationTab>('import');\n return (\n <PageLayout\n title=\"Migration\"\n description=\"Bring courses over from Canvas, Blackboard, Moodle and other LMSs with IMS Common Cartridge, and export courses and gradebooks in open formats.\"\n titleGradient\n >\n <div className=\"flex flex-col gap-4\">\n <Tabs<MigrationTab>\n value={tab}\n onChange={setTab}\n items={[\n { value: 'import', label: 'Import', icon: <Upload className=\"h-4 w-4\" /> },\n { value: 'export', label: 'Export', icon: <ArrowRightLeft className=\"h-4 w-4\" /> },\n { value: 'history', label: 'History', icon: <History className=\"h-4 w-4\" /> },\n ]}\n />\n <div role=\"tabpanel\" aria-label={formatEnumLabel(tab)}>\n {tab === 'import' && <ImportTab />}\n {tab === 'export' && <ExportTab />}\n {tab === 'history' && <HistoryTab />}\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0DA,IAAM,IACJ,sGAEI,IAAsD;CAC1D;EACE,KAAK;EACL,OACE;CACJ;CACA;EACE,KAAK;EACL,OACE;CACJ;CACA;EACE,KAAK;EACL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,CAAC,GAAK,KAAU,EAAuB,QAAQ;CACrD,OACE,kBAAC,GAAD;EACE,OAAM;EACN,aAAY;EACZ,eAAA;YAEA,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IACE,OAAO;IACP,UAAU;IACV,OAAO;KACL;MAAE,OAAO;MAAU,OAAO;MAAU,MAAM,kBAAC,GAAD,EAAQ,WAAU,UAAW,CAAA;KAAE;KACzE;MAAE,OAAO;MAAU,OAAO;MAAU,MAAM,kBAAC,GAAD,EAAgB,WAAU,UAAW,CAAA;KAAE;KACjF;MAAE,OAAO;MAAW,OAAO;MAAW,MAAM,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;KAAE;IAC9E;GACD,CAAA,GACD,kBAAC,OAAD;IAAK,MAAK;IAAW,cAAY,EAAgB,CAAG;cAApD;KACG,MAAQ,YAAY,kBAAC,GAAD,CAAY,CAAA;KAChC,MAAQ,YAAY,kBAAC,GAAD,CAAY,CAAA;KAChC,MAAQ,aAAa,kBAAC,GAAD,CAAa,CAAA;IAChC;KACF;;CACK,CAAA;AAEhB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-buildmyiq",
3
- "version": "2026.1107.2",
3
+ "version": "2026.1107.3",
4
4
  "description": "Burdenoff BuildMyIQ Microfrontend — education, learning & development",
5
5
  "type": "module",
6
6
  "files": [