openlearn-next 0.7.10 → 0.7.13

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.
Files changed (64) hide show
  1. package/README.md +9 -2
  2. package/dist/assets/{ActivityWorkspaceWidget-BU88GGUG.js → ActivityWorkspaceWidget-9DeXkxGk.js} +1 -1
  3. package/dist/assets/AdminDirectoryView-5gupeGAR.js +5 -0
  4. package/dist/assets/{AssessmentCenter-BoSWbJMt.js → AssessmentCenter-CPaqy0Xa.js} +1 -1
  5. package/dist/assets/{AssignmentFilePreview-D_POvLmv.js → AssignmentFilePreview-7fHtUuUL.js} +2 -2
  6. package/dist/assets/{BatchPickerModal-DiHd_6Tg.js → BatchPickerModal-0yIe1DXi.js} +1 -1
  7. package/dist/assets/{ClassesView-CWKqzWH0.js → ClassesView-CGpoW0IC.js} +5 -5
  8. package/dist/assets/{ClassroomCountdownWidget-B5-KUVU8.js → ClassroomCountdownWidget-B_5--dn_.js} +1 -1
  9. package/dist/assets/{CloudDriveModal-CjcvdDiw.js → CloudDriveModal-4Ts5Duh5.js} +1 -1
  10. package/dist/assets/{ComputerLabView-CNTcmWAh.js → ComputerLabView-DAEaKTBj.js} +1 -1
  11. package/dist/assets/{CourseManagement-ha_iSnLU.js → CourseManagement-CxIBH7lA.js} +1 -1
  12. package/dist/assets/{CourseWizardModal-oVT9mYSG.js → CourseWizardModal-R0xpa_Aw.js} +1 -1
  13. package/dist/assets/{CoursewareHubPanel-BuKp0mmW.js → CoursewareHubPanel-CpHptmSa.js} +1 -1
  14. package/dist/assets/{Dashboard-Vb9coh9_.js → Dashboard-DeBfP_Nc.js} +2 -2
  15. package/dist/assets/{ExportWeightModal-BEesz6rd.js → ExportWeightModal-DlnCOBlL.js} +1 -1
  16. package/dist/assets/{HelpTour-D3QcGDUz.js → HelpTour-Cztpqw_J.js} +1 -1
  17. package/dist/assets/{HelpView--Um9DFYx.js → HelpView-LPLAY9bq.js} +2 -2
  18. package/dist/assets/{ImportLessonsModal-DXGopj4j.js → ImportLessonsModal-BopEHmU_.js} +1 -1
  19. package/dist/assets/ImportModal-CYU3aMYY.js +3 -0
  20. package/dist/assets/{InteractiveCoursewareViewer-DzgF9_LU.js → InteractiveCoursewareViewer-CGc3P4HF.js} +1 -1
  21. package/dist/assets/InteractiveWhiteboard-DiyHrIGn.js +19 -0
  22. package/dist/assets/{LazyCourseware-6yb_QiYS.js → LazyCourseware-Bj1jm0nC.js} +2 -2
  23. package/dist/assets/LazyWhiteboard-NPD1EoyO.js +2 -0
  24. package/dist/assets/LessonEditorView-DqreBtFx.js +1 -0
  25. package/dist/assets/LiveClassroomView-eTc6Fb9g.js +64 -0
  26. package/dist/assets/{NotificationDetailModal-mUeIQP4R.js → NotificationDetailModal-B7G7ra9a.js} +1 -1
  27. package/dist/assets/{PluginView-CT3-zS2n.js → PluginView-DP6s-L70.js} +1 -1
  28. package/dist/assets/{ProcessLogsModal-DmsOrZnV.js → ProcessLogsModal-Dq5C4s7j.js} +1 -1
  29. package/dist/assets/{QuizGeneratorModal-ViKxNX5Q.js → QuizGeneratorModal-CoX9f8Wp.js} +1 -1
  30. package/dist/assets/RevealPresentationWrapper-wwlcfNWB.js +48 -0
  31. package/dist/assets/{StudentAssignmentEvalPanel-BRxHMABY.js → StudentAssignmentEvalPanel-DHb-asHQ.js} +1 -1
  32. package/dist/assets/{StudentAssignmentView-g-ewJIS3.js → StudentAssignmentView-AJpjQK3f.js} +1 -1
  33. package/dist/assets/{StudentLessonView-Dbvr3Xlo.js → StudentLessonView-Djd1T1QF.js} +1 -1
  34. package/dist/assets/{StudentView-20vfEk4v.js → StudentView-D41z7GY5.js} +2 -2
  35. package/dist/assets/{SystemResourceLibraryModal-CDKeaKf8.js → SystemResourceLibraryModal-CxmQh1HA.js} +1 -1
  36. package/dist/assets/TeacherView-DqSWaNuI.js +2 -0
  37. package/dist/assets/TimetableView-DrFs_xgc.js +6 -0
  38. package/dist/assets/{UTIF-BtQhea94.js → UTIF-u3Ct70K4.js} +1 -1
  39. package/dist/assets/index-7CK1B0tE.js +131 -0
  40. package/dist/assets/index-BaGZmpr6.css +1 -0
  41. package/dist/assets/{index.es-CijVATXs.js → index.es-CcQ2kcDj.js} +1 -1
  42. package/dist/assets/pluginParsers-BN3lQ7PJ.js +1 -0
  43. package/dist/assets/{student-workspace-DstiW0pM.js → student-workspace-DkTkcAGK.js} +1 -1
  44. package/dist/assets/{vendor-icons-DLOPlM4i.js → vendor-icons-CqLdl4B_.js} +1 -1
  45. package/dist/assets/{vendor-pdf-DVWGghIL.js → vendor-pdf-BMEc_Clb.js} +3 -3
  46. package/dist/assets/{vendor-pptx-BqU7v5zS.js → vendor-pptx-C0qaOH5T.js} +178 -178
  47. package/dist/index.html +3 -3
  48. package/dist/server.cjs +1666 -1846
  49. package/migrations/045_ai_providers_owner_and_scope.sql +20 -0
  50. package/migrations/README.md +1 -0
  51. package/migrations/schema-golden.json +13 -3
  52. package/package.json +5 -2
  53. package/dist/assets/AdminDirectoryView-Cdsk9Mdr.js +0 -5
  54. package/dist/assets/ImportModal-h5ShIMzO.js +0 -2
  55. package/dist/assets/InteractiveWhiteboard-DJqgP_tU.js +0 -65
  56. package/dist/assets/LazyWhiteboard-CsF9GB6J.js +0 -2
  57. package/dist/assets/LessonEditorView-CZTZ7Q0B.js +0 -1
  58. package/dist/assets/LiveClassroomView-D2ugupT9.js +0 -61
  59. package/dist/assets/TeacherView-KIKuhXGF.js +0 -2
  60. package/dist/assets/TimetableView-7V2AwWml.js +0 -6
  61. package/dist/assets/index-C4cHQZyx.css +0 -1
  62. package/dist/assets/index-XduPa2-x.js +0 -131
  63. package/dist/assets/pluginParsers-BO6U1E-h.js +0 -1
  64. package/dist/assets/vendor-reveal-DcQQzuI9.css +0 -1
@@ -1,3 +1,3 @@
1
- import{r as d,j as e}from"./vendor-react-DHoBZpn2.js";import{aa as B,ab as k,d as M,p as w,z as E,ac as R,v,E as A,x as F,y as U}from"./index-XduPa2-x.js";import{D as P,J as _,X as I,c as X,T as H}from"./vendor-icons-DLOPlM4i.js";function $(r){return!r||r<0?"":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/1024/1024).toFixed(1)} MB`}const V=({assignmentId:r,file:a,onClose:x,lang:j="zh"})=>{const i=j==="zh",[S,z]=d.useState(null),[p,y]=d.useState(null),[C,b]=d.useState(!1),l=a.original_name||a.name||"attachment",n=d.useMemo(()=>B({name:l}),[l]),N=`/api/assignments/${encodeURIComponent(r)}/files/${encodeURIComponent(a.id)}`,c=`${N}?disposition=inline`,f=N;d.useEffect(()=>{if(n.kind!=="text")return;let t=!1;return b(!0),y(null),fetch(c,{credentials:"same-origin"}).then(async s=>{if(!s.ok)throw new Error(`HTTP ${s.status}`);const o=await s.text();return o.length>k?`${o.slice(0,k)}
1
+ import{r as d,j as e}from"./vendor-react-DHoBZpn2.js";import{ab as D,ac as k,d as M,q as w,B as E,ad as R,w as v,E as A,y as F,z as U}from"./index-7CK1B0tE.js";import{D as P,J as _,X as I,c as X,T as H}from"./vendor-icons-CqLdl4B_.js";function $(r){return!r||r<0?"":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/1024/1024).toFixed(1)} MB`}const J=({assignmentId:r,file:a,onClose:x,lang:j="zh"})=>{const i=j==="zh",[S,z]=d.useState(null),[p,y]=d.useState(null),[C,b]=d.useState(!1),l=a.original_name||a.name||"attachment",n=d.useMemo(()=>D({name:l}),[l]),N=`/api/assignments/${encodeURIComponent(r)}/files/${encodeURIComponent(a.id)}`,c=`${N}?disposition=inline`,f=N;d.useEffect(()=>{if(n.kind!=="text")return;let t=!1;return b(!0),y(null),fetch(c,{credentials:"same-origin"}).then(async s=>{if(!s.ok)throw new Error(`HTTP ${s.status}`);const o=await s.text();return o.length>k?`${o.slice(0,k)}
2
2
 
3
- …(内容过长,已截断)`:o}).then(s=>{t||z(s)}).catch(s=>{t||y(s?.message||"Failed to load preview")}).finally(()=>{t||b(!1)}),()=>{t=!0}},[c,n.kind]),d.useEffect(()=>{const t=s=>{s.key==="Escape"&&x()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[x]);const T=M(t=>t.extensionPoints),u=d.useMemo(()=>(T.get("assignment.file.preview")??[]).filter(s=>{const o=w(s.slotProps),m=E(o.extensions)??[];return R(m,n.extension)?!0:(E(o.mimeTypes)??[]).map(g=>g.toLowerCase()).includes(n.contentType)}),[T,n.extension,n.contentType]),L=async t=>{const s=u.find(g=>g.id===t);if(!s)return;const o=w(s.slotProps),m=v(o,"commandType");if(!m)return;const h=await F.post("/api/plugins/execute-command",{type:m,payload:{fileId:a.id,assignmentId:r,fileName:l,downloadUrl:f,inlineUrl:c}});h.success||U.getState().addToast({id:`file-preview-cmd-error-${Date.now()}`,type:"error",title:i?"插件预览命令执行失败":"Plugin preview command failed",message:h.error||m})},D=()=>n.kind==="image"?e.jsx("img",{src:c,alt:l,className:"max-h-[68vh] w-auto max-w-full mx-auto rounded-lg bg-white/60","data-testid":"assignment-file-preview-image"}):n.kind==="pdf"?e.jsx("iframe",{src:c,title:l,className:"w-full h-[68vh] rounded-lg border border-theme bg-white","data-testid":"assignment-file-preview-pdf"}):n.kind==="text"?C?e.jsxs("div",{className:"flex items-center justify-center h-[40vh] gap-2 text-sm text-muted",children:[e.jsx(X,{size:16,className:"animate-spin"}),i?"正在加载预览…":"Loading preview…"]}):p?e.jsxs("div",{className:"flex items-center justify-center h-[40vh] gap-2 text-sm text-red-600",children:[e.jsx(H,{size:16}),i?`预览失败:${p}`:`Preview failed: ${p}`]}):e.jsx("pre",{className:"w-full max-h-[68vh] overflow-auto rounded-lg bg-slate-900/90 p-3 text-xs leading-relaxed text-slate-100 whitespace-pre-wrap break-all","data-testid":"assignment-file-preview-text",children:S??""}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-[40vh] gap-3 text-center","data-testid":"assignment-file-preview-unsupported",children:[e.jsx(P,{size:32,className:"text-muted"}),e.jsx("p",{className:"text-sm text-muted",children:i?`暂不支持预览 ${n.extension||"该"} 格式,可下载后查看`:`Preview for ${n.extension||"this"} format is not supported yet — download to view`}),u.length>0&&e.jsx("p",{className:"text-xs text-muted",children:i?"或使用插件提供的预览器:":"Or use a plugin previewer:"})]});return e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",role:"dialog","aria-modal":"true","aria-label":l,"data-testid":"assignment-file-preview",onClick:t=>{t.target===t.currentTarget&&x()},children:e.jsxs("div",{className:"w-full max-w-4xl max-h-[88vh] flex flex-col rounded-xl bg-surface shadow-2xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-theme shrink-0",children:[e.jsx(P,{size:16,className:"text-muted shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-sm font-medium text-main",children:l}),$(a.size)&&e.jsx("span",{className:"text-xs text-muted shrink-0",children:$(a.size)}),e.jsxs("a",{href:f,className:"flex items-center gap-1 rounded-lg border border-theme px-2 py-1 text-xs text-main hover:border-orange-300 shrink-0",title:i?"下载":"Download",children:[e.jsx(_,{size:13}),i?"下载":"Download"]}),e.jsx("button",{onClick:x,className:"rounded-lg p-1 text-muted hover:text-main shrink-0",title:i?"关闭":"Close","aria-label":i?"关闭":"Close",children:e.jsx(I,{size:16})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-4",children:D()}),u.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-t border-theme px-4 py-2 shrink-0",children:[e.jsx("span",{className:"text-xs text-muted",children:i?"插件预览器:":"Plugin previewers:"}),u.map(t=>{const s=w(t.slotProps);return v(s,"commandType")?e.jsx("button",{onClick:()=>void L(t.id),className:"rounded-lg border border-theme px-2 py-1 text-xs text-main hover:border-orange-300","data-testid":"assignment-file-preview-plugin",children:t.label||v(s,"title")||t.id},`${t.pluginId}/${t.id}`):null}),e.jsx(A,{slot:"assignment.file.preview",slotProps:{file:{id:a.id,name:l,size:a.size??null,mime:a.mime??null},fileExtension:n.extension,assignmentId:r,downloadUrl:f,inlineUrl:c,lang:j}})]})]})})};export{V as A};
3
+ …(内容过长,已截断)`:o}).then(s=>{t||z(s)}).catch(s=>{t||y(s?.message||"Failed to load preview")}).finally(()=>{t||b(!1)}),()=>{t=!0}},[c,n.kind]),d.useEffect(()=>{const t=s=>{s.key==="Escape"&&x()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[x]);const T=M(t=>t.extensionPoints),u=d.useMemo(()=>(T.get("assignment.file.preview")??[]).filter(s=>{const o=w(s.slotProps),m=E(o.extensions)??[];return R(m,n.extension)?!0:(E(o.mimeTypes)??[]).map(g=>g.toLowerCase()).includes(n.contentType)}),[T,n.extension,n.contentType]),L=async t=>{const s=u.find(g=>g.id===t);if(!s)return;const o=w(s.slotProps),m=v(o,"commandType");if(!m)return;const h=await F.post("/api/plugins/execute-command",{type:m,payload:{fileId:a.id,assignmentId:r,fileName:l,downloadUrl:f,inlineUrl:c}});h.success||U.getState().addToast({id:`file-preview-cmd-error-${Date.now()}`,type:"error",title:i?"插件预览命令执行失败":"Plugin preview command failed",message:h.error||m})},B=()=>n.kind==="image"?e.jsx("img",{src:c,alt:l,className:"max-h-[68vh] w-auto max-w-full mx-auto rounded-lg bg-white/60","data-testid":"assignment-file-preview-image"}):n.kind==="pdf"?e.jsx("iframe",{src:c,title:l,className:"w-full h-[68vh] rounded-lg border border-theme bg-white","data-testid":"assignment-file-preview-pdf"}):n.kind==="text"?C?e.jsxs("div",{className:"flex items-center justify-center h-[40vh] gap-2 text-sm text-muted",children:[e.jsx(X,{size:16,className:"animate-spin"}),i?"正在加载预览…":"Loading preview…"]}):p?e.jsxs("div",{className:"flex items-center justify-center h-[40vh] gap-2 text-sm text-red-600",children:[e.jsx(H,{size:16}),i?`预览失败:${p}`:`Preview failed: ${p}`]}):e.jsx("pre",{className:"w-full max-h-[68vh] overflow-auto rounded-lg bg-slate-900/90 p-3 text-xs leading-relaxed text-slate-100 whitespace-pre-wrap break-all","data-testid":"assignment-file-preview-text",children:S??""}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-[40vh] gap-3 text-center","data-testid":"assignment-file-preview-unsupported",children:[e.jsx(P,{size:32,className:"text-muted"}),e.jsx("p",{className:"text-sm text-muted",children:i?`暂不支持预览 ${n.extension||"该"} 格式,可下载后查看`:`Preview for ${n.extension||"this"} format is not supported yet — download to view`}),u.length>0&&e.jsx("p",{className:"text-xs text-muted",children:i?"或使用插件提供的预览器:":"Or use a plugin previewer:"})]});return e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",role:"dialog","aria-modal":"true","aria-label":l,"data-testid":"assignment-file-preview",onClick:t=>{t.target===t.currentTarget&&x()},children:e.jsxs("div",{className:"w-full max-w-4xl max-h-[88vh] flex flex-col rounded-xl bg-surface shadow-2xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-theme shrink-0",children:[e.jsx(P,{size:16,className:"text-muted shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-sm font-medium text-main",children:l}),$(a.size)&&e.jsx("span",{className:"text-xs text-muted shrink-0",children:$(a.size)}),e.jsxs("a",{href:f,className:"flex items-center gap-1 rounded-lg border border-theme px-2 py-1 text-xs text-main hover:border-orange-300 shrink-0",title:i?"下载":"Download",children:[e.jsx(_,{size:13}),i?"下载":"Download"]}),e.jsx("button",{onClick:x,className:"rounded-lg p-1 text-muted hover:text-main shrink-0",title:i?"关闭":"Close","aria-label":i?"关闭":"Close",children:e.jsx(I,{size:16})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-4",children:B()}),u.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-t border-theme px-4 py-2 shrink-0",children:[e.jsx("span",{className:"text-xs text-muted",children:i?"插件预览器:":"Plugin previewers:"}),u.map(t=>{const s=w(t.slotProps);return v(s,"commandType")?e.jsx("button",{onClick:()=>void L(t.id),className:"rounded-lg border border-theme px-2 py-1 text-xs text-main hover:border-orange-300","data-testid":"assignment-file-preview-plugin",children:t.label||v(s,"title")||t.id},`${t.pluginId}/${t.id}`):null}),e.jsx(A,{slot:"assignment.file.preview",slotProps:{file:{id:a.id,name:l,size:a.size??null,mime:a.mime??null},fileExtension:n.extension,assignmentId:r,downloadUrl:f,inlineUrl:c,lang:j}})]})]})})};export{J as A};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-react-DHoBZpn2.js";import{m as g}from"./index-XduPa2-x.js";import"./vendor-utils-BxOuk3id.js";import"./vendor-icons-DLOPlM4i.js";import"./vendor-pdf-DVWGghIL.js";import"./vendor-motion-BFAPOs-b.js";import"./vendor-charts-skggaP9D.js";function z({batchPicker:l,setBatchPicker:o,batchPickerLesson:t,setBatchPickerLesson:a,batchPickerDate:i,setBatchPickerDate:n,batchPickerTargetClass:d,setBatchPickerTargetClass:c,lessons:x,classes:u,expandedClassId:m,confirmBatchPicker:h,lang:r}){return l?e.jsx("div",{className:"fixed inset-0 bg-gray-900/40 backdrop-blur-sm flex items-center justify-center p-6 z-50",children:e.jsxs(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-white border text-gray-900 border-gray-200 rounded-2xl shadow-2xl w-full max-w-md flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/80",children:[e.jsx("h2",{className:"font-bold text-gray-800 text-base",children:l==="schedule"?r==="zh"?"批量排课":"Batch Schedule":l==="lockedLesson"?r==="zh"?"批量设置锁定课程":"Batch Lock Lesson":r==="zh"?"批量转班":"Batch Transfer"}),e.jsx("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 text-lg font-bold p-1 hover:bg-gray-200 rounded",children:"×"})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[(l==="schedule"||l==="lockedLesson")&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-gray-600",children:r==="zh"?"选择课程":"Select Lesson"}),e.jsxs("select",{value:t,onChange:s=>a(s.target.value),className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[e.jsx("option",{value:"",children:r==="zh"?"— 请选择 —":"— Select —"}),x.map(s=>e.jsx("option",{value:s.id,children:s.title},s.id))]})]}),l==="schedule"&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-gray-600",children:r==="zh"?"上课日期":"Schedule Date"}),e.jsx("input",{type:"date",value:i,onChange:s=>n(s.target.value),className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),l==="transfer"&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-gray-600",children:r==="zh"?"选择目标班级":"Select Target Class"}),e.jsxs("select",{value:d,onChange:s=>c(s.target.value),className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[e.jsx("option",{value:"",children:r==="zh"?"— 请选择 —":"— Select —"}),u.filter(s=>s.id!==m).map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))]})]})]}),e.jsxs("div",{className:"p-4 border-t border-gray-100 flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>o(null),className:"px-4 py-2 text-sm rounded-lg border border-gray-200 text-gray-600 hover:bg-gray-100 cursor-pointer",children:r==="zh"?"取消":"Cancel"}),e.jsx("button",{onClick:h,className:"px-4 py-2 text-sm rounded-lg bg-indigo-600 text-white hover:bg-indigo-700 cursor-pointer",children:r==="zh"?"确认":"Confirm"})]})]})}):null}export{z as BatchPickerModal};
1
+ import{j as e}from"./vendor-react-DHoBZpn2.js";import{m as g}from"./index-7CK1B0tE.js";import"./vendor-utils-BxOuk3id.js";import"./vendor-icons-CqLdl4B_.js";import"./vendor-pdf-BMEc_Clb.js";import"./vendor-motion-BFAPOs-b.js";import"./vendor-charts-skggaP9D.js";function z({batchPicker:l,setBatchPicker:o,batchPickerLesson:t,setBatchPickerLesson:a,batchPickerDate:i,setBatchPickerDate:n,batchPickerTargetClass:d,setBatchPickerTargetClass:c,lessons:x,classes:u,expandedClassId:m,confirmBatchPicker:h,lang:r}){return l?e.jsx("div",{className:"fixed inset-0 bg-gray-900/40 backdrop-blur-sm flex items-center justify-center p-6 z-50",children:e.jsxs(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-white border text-gray-900 border-gray-200 rounded-2xl shadow-2xl w-full max-w-md flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/80",children:[e.jsx("h2",{className:"font-bold text-gray-800 text-base",children:l==="schedule"?r==="zh"?"批量排课":"Batch Schedule":l==="lockedLesson"?r==="zh"?"批量设置锁定课程":"Batch Lock Lesson":r==="zh"?"批量转班":"Batch Transfer"}),e.jsx("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 text-lg font-bold p-1 hover:bg-gray-200 rounded",children:"×"})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[(l==="schedule"||l==="lockedLesson")&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-gray-600",children:r==="zh"?"选择课程":"Select Lesson"}),e.jsxs("select",{value:t,onChange:s=>a(s.target.value),className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[e.jsx("option",{value:"",children:r==="zh"?"— 请选择 —":"— Select —"}),x.map(s=>e.jsx("option",{value:s.id,children:s.title},s.id))]})]}),l==="schedule"&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-gray-600",children:r==="zh"?"上课日期":"Schedule Date"}),e.jsx("input",{type:"date",value:i,onChange:s=>n(s.target.value),className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),l==="transfer"&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-gray-600",children:r==="zh"?"选择目标班级":"Select Target Class"}),e.jsxs("select",{value:d,onChange:s=>c(s.target.value),className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[e.jsx("option",{value:"",children:r==="zh"?"— 请选择 —":"— Select —"}),u.filter(s=>s.id!==m).map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))]})]})]}),e.jsxs("div",{className:"p-4 border-t border-gray-100 flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>o(null),className:"px-4 py-2 text-sm rounded-lg border border-gray-200 text-gray-600 hover:bg-gray-100 cursor-pointer",children:r==="zh"?"取消":"Cancel"}),e.jsx("button",{onClick:h,className:"px-4 py-2 text-sm rounded-lg bg-indigo-600 text-white hover:bg-indigo-700 cursor-pointer",children:r==="zh"?"确认":"Confirm"})]})]})}):null}export{z as BatchPickerModal};