UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

549 lines (542 loc) 19.8 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/components/ExamPageLayout/GabaritoCard.tsx var _react = require('react'); var _jsxruntime = require('react/jsx-runtime'); function PrintStyles() { return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { children: ` @media print { @page { size: A4; margin: 0; } html, body { margin: 0 !important; padding: 0 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } .gabarito-page-container { padding: 0 !important; margin: 0 !important; background: white !important; display: block !important; } .gabarito-card-container { box-shadow: none !important; border: none !important; padding: 12mm !important; margin: 0 !important; width: 210mm !important; height: 297mm !important; } .gabarito-card-container:last-child { page-break-after: auto !important; margin-bottom: 0 !important; } .gabarito-qr-code { bottom: 12px !important; right: 12px !important; } } ` }); } var pageContainerStyle = { minHeight: "100vh", background: "#f3f4f6", display: "flex", flexDirection: "column", alignItems: "center", padding: "24px 0" }; function PageContainer({ children }) { return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "gabarito-page-container", style: pageContainerStyle, children }); } var cardContainerStyle = { background: "white", width: "210mm", height: "297mm", boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1)", border: "1px solid #d1d5db", padding: "24px", fontSize: "11px", lineHeight: 1.3, fontFamily: "Arial, Helvetica, sans-serif", color: "#000000", position: "relative", boxSizing: "border-box", pageBreakAfter: "always", pageBreakInside: "avoid", marginBottom: "24px" }; var CardContainer = _react.forwardRef.call(void 0, ({ children }, ref) => { return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className: "gabarito-card-container", style: cardContainerStyle, children } ); }); CardContainer.displayName = "CardContainer"; var styles = { headerBar: { background: "#000000", color: "white", padding: "6px 12px", display: "flex", alignItems: "center", gap: "8px", fontSize: "16px", fontWeight: 700, marginBottom: 0 }, subHeader: { padding: "4px 12px", fontSize: "10px", color: "#374151", borderLeft: "1px solid #9ca3af", borderRight: "1px solid #9ca3af" }, infoBox: { border: "1px solid #9ca3af", marginTop: "4px" }, infoRow: { display: "flex" }, infoRowWithBorder: { display: "flex", borderTop: "1px solid #9ca3af" }, infoField: { flex: 1, padding: "6px" }, infoFieldLabel: { fontWeight: 700, fontSize: "9px" }, infoFieldContent: { height: "20px", marginTop: "2px" }, smallInfoField: { width: "144px", padding: "6px", display: "flex", alignItems: "flex-start" }, foreignLanguageBox: { width: "160px", borderRight: "1px solid #9ca3af", padding: "8px" }, foreignLanguageTitle: { fontWeight: 700, fontSize: "9px", textAlign: "center", marginBottom: "4px" }, foreignLanguageOption: { display: "flex", alignItems: "center", gap: "6px", marginLeft: "8px", marginTop: "4px" }, checkbox: { width: "12px", height: "12px", borderRadius: "50%", border: "1px solid #6b7280", display: "inline-block" }, proctorBox: { flex: 1, padding: "8px" }, proctorTitle: { fontWeight: 700, fontSize: "9px", textAlign: "center", marginBottom: "4px" }, proctorItem: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "0 8px", fontSize: "10px", marginTop: "4px" }, checkboxGroup: { display: "flex", alignItems: "center", gap: "4px" }, signatureBox: { border: "1px solid #9ca3af", borderTop: 0, padding: "8px", textAlign: "center" }, signatureTitle: { fontWeight: 700, fontSize: "9px", marginBottom: "8px" }, signatureLine: { borderBottom: "1px solid #9ca3af", margin: "16px 32px 0 32px" }, instructionsBox: { border: "1px solid #9ca3af", borderTop: 0, padding: "8px" }, instructionsTitle: { fontWeight: 700, fontSize: "10px", textAlign: "center", marginBottom: "4px" }, instructionsText: { fontSize: "9px", padding: "0 4px" }, instructionsParagraph: { margin: "2px 0" }, transcriptionBox: { border: "1px solid #9ca3af", borderTop: 0, padding: "8px" }, transcriptionTitle: { fontWeight: 700, fontSize: "9px", textAlign: "center" }, transcriptionLine: { borderBottom: "1px solid #9ca3af", margin: "20px 16px 0 16px" }, transcriptionLineSecond: { borderBottom: "1px solid #9ca3af", margin: "16px 16px 0 16px" }, exampleSection: { marginTop: "8px", display: "flex", justifyContent: "space-between", alignItems: "flex-start", padding: "0 4px", gap: "12px" }, exampleText: { flex: 1 }, exampleTextTitle: { fontWeight: 700, fontSize: "10px", marginBottom: "4px" }, exampleTextParagraph: { fontSize: "9px", margin: "2px 0" }, exampleBox: { width: "224px", border: "1px solid #9ca3af", padding: "6px" }, exampleBoxTitle: { fontWeight: 700, fontSize: "9px", marginBottom: "4px" }, exampleRow: { display: "flex", alignItems: "center", gap: "4px", fontSize: "9px", marginBottom: "2px" }, exampleRowNumero: { fontWeight: 700, marginLeft: "4px" }, exampleBubble: { width: "16px", height: "16px", borderRadius: "50%", border: "1px solid #6b7280", display: "inline-flex", alignItems: "center", justifyContent: "center", fontSize: "7px", fontWeight: 700, background: "white", color: "#6b7280" }, exampleBubbleFilled: { width: "16px", height: "16px", borderRadius: "50%", border: "1px solid #6b7280", display: "inline-flex", alignItems: "center", justifyContent: "center", fontSize: "7px", fontWeight: 700, background: "#000000", color: "white" }, gridContainer: { marginTop: "8px", border: "1px solid #9ca3af" }, gridHeader: { display: "flex", background: "#e5e7eb", borderBottom: "1px solid #9ca3af" }, gridHeaderCell: { flex: 1, textAlign: "center", fontSize: "8px", fontWeight: 700, padding: "4px 0" }, gridHeaderCellWithBorder: { flex: 1, textAlign: "center", fontSize: "8px", fontWeight: 700, padding: "4px 0", borderRight: "1px solid #9ca3af" }, gridRow: { display: "flex" }, gridRowWithBorder: { display: "flex", borderBottom: "1px solid #e5e7eb" }, gridCell: { flex: 1, display: "flex", alignItems: "center", padding: "6px 4px" }, gridCellWithBorder: { flex: 1, display: "flex", alignItems: "center", padding: "6px 4px", borderRight: "1px solid #9ca3af" }, gridCellNumero: { width: "20px", textAlign: "right", fontSize: "9px", fontWeight: 500, marginRight: "8px" }, gridCellBubbles: { display: "flex", gap: "1px" }, gridCellEmpty: { color: "#d1d5db", marginLeft: "24px" }, answerBubble: { width: "18px", height: "18px", borderRadius: "50%", border: "1px solid #9ca3af", display: "inline-flex", alignItems: "center", justifyContent: "center", fontSize: "9px", color: "#9ca3af" }, qrCodeImage: { width: "180px", height: "180px", position: "absolute", bottom: "20px", right: "20px" } }; var OPTIONS = ["A", "B", "C", "D", "E"]; var NUM_COLUMNS = 5; var ROWS_PER_COLUMN = 10; function AnswerSheetCard({ studentName, qrCodeDataUrl, totalQuestions, examTitle, schoolName, className }) { const getQuestionNumber = (colIdx, rowIdx) => { const questionNum = colIdx * ROWS_PER_COLUMN + rowIdx + 1; return questionNum <= totalQuestions ? questionNum : null; }; return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.headerBar, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "\u25A0" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "CARTAO-RESPOSTA" }) ] }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.subHeader, children: examTitle || "Simulado Analytica 2026" }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.infoBox, children: [ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.infoRow, children: [ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { ...styles.infoField, flex: 3, borderRight: "1px solid #9ca3af" }, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.infoFieldLabel, children: "NOME COMPLETO:" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.infoFieldContent, children: studentName }) ] } ), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.smallInfoField, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.infoFieldLabel, children: "INFORMACOES DO ALUNO" }) }) ] }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.infoRowWithBorder, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.infoField, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.infoFieldLabel, children: "ESCOLA E TURMA:" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.infoFieldContent, children: schoolName && className ? `${schoolName} - ${className}` : schoolName || className || "" }) ] }) }) ] }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...styles.infoBox, borderTop: 0 }, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.infoRow, children: [ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.foreignLanguageBox, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.foreignLanguageTitle, children: "LINGUA ESTRANGEIRA" }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.foreignLanguageOption, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.checkbox }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "INGLES" }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.foreignLanguageOption, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.checkbox }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "ESPANHOL" }) ] }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.proctorBox, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.proctorTitle, children: "PARA USO EXCLUSIVO DO FISCAL DE SALA" }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.proctorItem, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "PARTICIPANTE AUSENTE" }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.checkboxGroup, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "SIM" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.checkbox }) ] }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.proctorItem, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "PARTICIPANTE PRESENTE DEIXOU O CARTAO-RESPOSTA EM BRANCO" }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.checkboxGroup, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "SIM" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.checkbox }) ] }) ] }) ] }) ] }) }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.signatureBox, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.signatureTitle, children: "ASSINATURA DO PARTICIPANTE" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.signatureLine }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.instructionsBox, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.instructionsTitle, children: "INSTRUCOES" }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.instructionsText, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.instructionsParagraph, children: "1. Verifique se seu nome completo e os dados impressos neste CARTAO-RESPOSTA estao corretos. Assine somente no local apropriado." }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.instructionsParagraph, children: "2. O CARTAO-RESPOSTA e o unico documento para correcao eletronica. Nao o amasse, rasque, dobre ou rasure. Nao havera substituicao por erro do participante." }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.instructionsParagraph, children: "3. Em nenhuma hipotese voce podera levar o CARTAO-RESPOSTA ao deixar a sala de provas, sob pena de eliminacao no exame." }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.instructionsParagraph, children: "4. Preencha suas respostas nos campos apropriados conforme o EXEMPLO DE PREENCHIMENTO. O preenchimento incorreto impossibilita a leitura otica." }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.instructionsParagraph, children: "5. Entregue este CARTAO-RESPOSTA ao aplicador ao termino da realizacao do exame." }) ] }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.transcriptionBox, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.transcriptionTitle, children: "TRANSCREVA AQUI A FRASE APRESENTADA NA CAPA DE SEU CADERNO DE QUESTOES, CONFORME AS INSTRUCOES NELA CONTIDAS." }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.transcriptionLine }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.transcriptionLineSecond }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.exampleSection, children: [ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.exampleText, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.exampleTextTitle, children: "EXEMPLO DE PREENCHIMENTO" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.exampleTextParagraph, children: "Preencha os circulos completamente, conforme a imagem ao lado, utilizando" }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.exampleTextParagraph, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "caneta esferografica de tinta preta, fabricada em material transparente." }) }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: styles.exampleTextParagraph, children: "Nao sera permitido o uso de lapis, lapiseira (grafite) e borracha." }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.exampleBox, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.exampleBoxTitle, children: "Exemplo de resposta" }), [ { q: 1, label: "A", answer: "A" }, { q: 2, label: "B", answer: "B" }, { q: 3, label: "C", answer: "C" } ].map(({ q, label, answer }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.exampleRow, children: [ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [ "Resposta da questao X = ", label, " ->" ] }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.exampleRowNumero, children: String(q).padStart(2, "0") }), OPTIONS.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: opt === answer ? styles.exampleBubbleFilled : styles.exampleBubble, children: opt }, opt )) ] }, q)) ] }) ] }), /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.gridContainer, children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.gridHeader, children: Array.from({ length: NUM_COLUMNS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: i < NUM_COLUMNS - 1 ? styles.gridHeaderCellWithBorder : styles.gridHeaderCell, children: "Questao / Resposta" }, i )) }), Array.from({ length: ROWS_PER_COLUMN }, (_, rowIdx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: rowIdx < ROWS_PER_COLUMN - 1 ? styles.gridRowWithBorder : styles.gridRow, children: Array.from({ length: NUM_COLUMNS }, (_2, colIdx) => { const questionNum = getQuestionNumber(colIdx, rowIdx); return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: colIdx < NUM_COLUMNS - 1 ? styles.gridCellWithBorder : styles.gridCell, children: questionNum === null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.gridCellEmpty, children: "-" }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.gridCellNumero, children: questionNum }), /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.gridCellBubbles, children: OPTIONS.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.answerBubble, children: opt }, opt)) }) ] }) }, colIdx ); }) }, rowIdx )) ] }), qrCodeDataUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: qrCodeDataUrl, alt: "QR Code", className: "gabarito-qr-code", style: styles.qrCodeImage } ) ] }); } var GabaritoCard_default = AnswerSheetCard; exports.PrintStyles = PrintStyles; exports.PageContainer = PageContainer; exports.CardContainer = CardContainer; exports.AnswerSheetCard = AnswerSheetCard; exports.GabaritoCard_default = GabaritoCard_default; //# sourceMappingURL=chunk-GVSA4SX7.js.map