Histórico da Página
| HTML |
|---|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"><style>
.release-notes-container {
<style>
* {font-family: Arial, sans-serif;
marginmax-width: 01200px;
paddingmargin: 0 auto;
box-sizingpadding: border-box20px;
}
.header {
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
font-family: 'Segoe UI', Arial, sans-serif;
color: white;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2padding: 100%)20px;
minborder-heightradius: 100vh8px;
paddingmargin-bottom: 20px;
}
.header h1 {
.release-notes-wrapper { margin: 0;
maxfont-widthsize: 1400px24px;
}
margin: 0.metadata auto;{
background-color: white#f4f5f7;
border-radiuspadding: 12px15px;
boxborder-shadowradius: 0 10px 40px rgba(0, 0, 0, 0.15)5px;
overflowmargin: 20px hidden0;
}
display: flex;
.header {justify-content: space-between;
backgroundflex-wrap: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
wrap;
}
color: white;.metadata-item {
paddingmargin: 30px5px 40px0;
}
border-radius: 0;.metadata-item strong {
margin-bottomcolor: 0#667eea;
}
position: relative; .widget-container {
overflowmargin: hidden20px 0;
}
border: 1px solid #ddd;
.header::before {border-radius: 5px;
contentoverflow: ''hidden;
positionmin-height: absolute600px;
}
top: -50%;
.loading {
right: -10% text-align: center;
widthpadding: 500px40px;
heightcolor: 500px#666;
}
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);.error {
borderbackground-radiuscolor: 50%#fee;
}
color:
#c33;
.header h1 {
marginpadding: 015px;
fontborder-sizeradius: 32px5px;
font-weightmargin: 60020px 0;
}
.metadata.warning {
background-color: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)#fff3cd;
paddingcolor: 20px 40px#856404;
border-bottompadding: 1px solid #dee2e615px;
displayborder-radius: flex5px;
align-itemsmargin: 20px center0;
}
gap: 30px;
.links {
flex-wrap: wrap;
margin: }20px 0;
}
.metadata-itemlinks a {
display: flexinline-block;
align-items: centermargin: 5px 10px 5px 0;
gappadding: 8px 10px15px;
}
background-color: #0052CC;
.metadata-item strong { color: white;
colortext-decoration: #495057none;
fontborder-weightradius: 6004px;
}
font-weight: bold;
.metadata-item span {}
color: #0A2333;.links a:hover {
background-color: white#0065FF;
}
padding: 6px 14px;
</style>
</head>
<body>
<div class="release-notes-container">
border-radius: 6px;
<div class="header">
<h1 font-weight: 600;id="page-title">Dicionário de Dados</h1>
</div>
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
<div class="metadata">
}
<div class="metadata-item">
.doc-link {
<strong>Versão:</strong> <span id="version">Carregando...</span>
display: inline-flex;
</div>
align-items: center;
<div class="metadata-item">
gap: 8px;
<strong>Última paddingatualização:</strong> 10px 20px;<span id="last-update">-</span>
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
</div>
</div>
color: white;
<div class="links" id="links-container">
text-decoration: none;
<!-- Links serão inseridos aqui border-radius: 8px;-->
</div>
font-weight: 600;
<div font-size: 14px;class="widget-container">
transition: all 0.3s ease;<div id="loading" class="loading">
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);🔄 Carregando documento...
margin-left: auto;</div>
}
<div id="error" class="error" style="display: none;"></div>
.doc-link:hover {
<div transform: translateY(-2px);id="warning" class="warning" style="display: none;"></div>
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);<div id="widget-placeholder"></div>
</div>
</div>
}<script>
(function() {
.doc-link:active {
// Mapeamento de versões para Document IDs do Google transform: translateY(0);
Docs
}
// Gerado automaticamente a partir
da pasta do Google Drive
#widget-container {
padding: 0;// ATUALIZADO: 2025-12-16
min-height: 700px;
const versionToDocId = {
background: #ffffff;
// Google Docs }existentes
.message-box {'12.1.2503.14': '13QaSU_lP1_haWnOYl7UjPvsKfi3AaPdKwciYHrceEt4',
padding: 40px;
'12.1.2511.2': '1gLo16QDT99iGdaoKyFHBW1n5jF-gt-awBjnSQrBZa3c',
text-align: center;
background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
// NOTA: A maioria das versões margin: 30px;
ainda tem apenas arquivos .txt
border-radius: 10px;
// Quando os arquivos .txt forem border-left: 5px solid #ffc107;convertidos para Google Docs,
box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2); // adicione os Document IDs aqui ou execute o script generate_version_mapping.py novamente
};
.message-box.error {
// Função para extrair versão background: linear-gradient(135deg, #fee 0%, #fcc 100%);do título "Dicionário de Dados 12.1.2503.14"
border-left-color: #dc3545;function extractVersionFromTitle() {
box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2)let version = null;
}
.message-box h2 {
// Padrão regex para colorversão: #856404;números.números.números.números
margin-bottom: 15px;
const versionPattern font-size: 24px= /(\d+\.\d+\.\d+(?:\.\d+)?)/;
}
.message-box.error h2 {
// Método 1: Título da color: #721c24;
página (Confluence)
}
const
pageTitle = document.querySelector('h1#title-text, .page-title, h1, [data-page-title]');
.message-box p {
if color: #856404;(pageTitle) {
font-size: 16px;
const titleText line-height: 1.6= pageTitle.textContent.trim();
}
const match = .message-box.error p {
titleText.match(versionPattern);
color: #721c24;
if (match) {
}
.message-icon {
version = match[1];
font-size: 48px;
margin-bottom: 15px; }
display: block; }
}
iframe {
// Método 2: Meta tags
border: none;
width: 100%;
if (!version) {
height: 800px;
const metaTitle display: block= document.querySelector('meta[property="og:title"], meta[name="title"]');
}
if .loading (metaTitle) {
text-align: center;
padding: 60px 20pxconst titleText = metaTitle.getAttribute('content') || '';
color: #6c757d;
font-size: 18pxconst match = titleText.match(versionPattern);
}
.loading::beforeif (match) {
content: '';
version display: block= match[1];
width: 50px;
}
height: 50px;
margin: 0 auto 20px;}
border: 4px solid #e9ecef;}
border-top-color: #667eea;
border-radius: 50%;
// Método 3: document.title
animation: spin 1s linear infinite;
}
if (!version) {
@keyframes spin {
const match = document.title.match(versionPattern);
from { transform: rotate(0deg); }
to {if transform: rotate(360degmatch); }{
}
@media (max-width: 768px) {version = match[1];
body {
}
padding: 10px;
}
.header {
// Método 4: URL (fallback)
padding: 20px;
if (!version) }{
const urlParams = new .header h1 {URLSearchParams(window.location.search);
font-size: 24px;
const titleParam = urlParams.get('title');
}
if (titleParam) {
.metadata {
const padding:match 15px 20px;
= decodeURIComponent(titleParam).match(versionPattern);
flex-direction: column;
if (match) {
align-items: flex-start;
version = }
match[1];
}
.doc-link {
margin-left: 0; }
margin-top: 10px;
}
width: 100%;
justify-content: centerreturn version;
}
}
</style>
</head>
<body>
<div class="release-notes-wrapper">
// <div class="header">
<h1 id="page-title">Dicionário de Dados</h1>
Função para buscar Document ID no Google Drive (via API - requer autenticação)
<//div>
Esta é uma função placeholder - você
precisaria implementar a busca via API
<div class="metadata">
async function <div class="metadata-item">findDocumentInDrive(version) {
<strong>Versão:<//strong>
Por enquanto, retorna null
<span id="version-display">Carregando...</span>
// Em uma implementação completa, você faria uma chamada à </div>
API do Google Drive
<div class="metadata-item">
// para buscar o documento pelo nome
<strong>Última atualização:</strong>
return null;
<span id="last-update">-</span>
}
</div>
<a href="#" id="doc-link" class="doc-link" target="_blank" style="display: none;">
// Função principal
function <span>📄</span>init() {
<span>Abrirconst noversion Google Docs</span>
= extractVersionFromTitle();
</a>
</div>
if (!version) {
<div id="widget-container">
<div class="loading">Carregando documento...</div>
document.getElementById('error').style.display = 'block';
</div>
</div>
<script>
(function() {document.getElementById('error').innerHTML =
// Mapeamento de versões para Document IDs do Google Docs e arquivos .txt
'❌ <strong>Versão não identificada</strong><br>' +
// Gerado automaticamente a partir da pasta: 141aJRhZeYZca4QCBnou6-00WzRLkBYbs
'Certifique-se de que //o Data: 2025-12-16
// Total: 62 versões (2 Google Docs + 60 arquivos .txt - todos funcionando!)
const versionToDocId = {título da página contém a versão no formato: "Dicionário de Dados 12.1.2503.14"';
document.getElementById('loading').style.display = 'none';
// Google Docs (2)return;
'12.1.2503.14': '13QaSU_lP1_haWnOYl7UjPvsKfi3AaPdKwciYHrceEt4',}
'12.1.2511.2': '1gLo16QDT99iGdaoKyFHBW1n5jF-gt-awBjnSQrBZa3c',
// Atualizar interface
// Arquivos document.txt (60) - funcionando diretamente no Widget Connector
getElementById('version').textContent = version;
document.getElementById('page-title').textContent = `Dicionário '12.1.2503': '1BRsJyHOHQNOEpAfIm5ndOn6z_0gffbaF',de Dados ${version}`;
'12.1.2503.15': '12ejZuDikegyaH2n16n2Hpas1Z3VEjc5e',document.getElementById('last-update').textContent = new Date().toLocaleString('pt-BR');
'12.1.2503.16': '15BkT50wXw7kJccfw4iRB-LVGQyTzQVf1',
// Obter Document ID
'12.1.2503.17': '1L4FUKbDjnAs29rK0ymfMgRVJPPVtzYdW',let docId = versionToDocId[version];
'12.1.2503.18': '1LNSFua5jsEw9m2D4X7lBVsbk6qXsG3cm',
'12.1.2507': '1pT42y90cnf2UY2gK5k035jEFVkIs7s-n',if (!docId) {
'12.1.2507.1': '1lo7KiRJGWYJFfH-Xqv-dvNcRoIy6ecj3',
// Tentar buscar no Google Drive (se implementado)
'12.1.2507.2': '1xe9L8cCurcXIw5tzxe4H9KNzFgpIObA1',
findDocumentInDrive(version).then(foundId => {
'12.1.2507.3': '1P9jEM2cgtUkyfdK5bsKlSvFCk_SqpMqU',
if (foundId) {
'12.1.2507.4': '12Qk7mEnEe2iIsE-nFUUGOmbt_t8rwjn-',
'12.1.2507.5': '1ljgI7Re2mT3yv7TgnZLOZv_n0vzzJTxF',
docId = foundId;
'12.1.2507.6': '1lwblHVXZUKF8qgdajVB2Va41fxpJkZ9X', loadDocument(docId, version);
'12.1.2507.7': '1LWO9GFD8iO6HQEJn_wBybP1EdZ2AZSsD',
} else {
'12.1.2507.8': '1bhB3Pig68EAvmXGoUptLYnJPEnGW4fVr',
'12.1.2507.9': '1shjpLbeGfQmrV6DMtm4EuIvqdhHTuEIy', showWarning(version);
'12.1.2507.10': '1wU40XkkEMRqw4Ieanf5QrkBz8SwqISzj', }
'12.1.2507.11': '1goM3M1WCXvtdx46fY7ZmeeDtwpnvbld5',
});
'12.1.2507.12': '15r-G5LdQpPn9gcktkpYVPQS1exs6Io8t',
'12.1.2507.13': '1xVHx0mjDewGUVwIGR8GWqTMqX1R_Cj21',
if (!docId) {
'12.1.2507.14': '1uFblMZhJaYPFrGKtFCC9bAa-2xxtXmi_',
'12.1.2507.15': '1vNN6ONnbq1ApNJy6uzGW_hZ27HvhW7Dd',
showWarning(version);
'12.1.2507.16': '1g27jhn6ZEliSZhAJ7Co9FUFLtNBfqVHH', return;
'12.1.2507.17': '1LkwBvxVy_oykf3gEAwlf2eRn0NMiMnL1', }
'12.1.2507.18': '1he66XmpG6YhgKlxtMv3xik6KccuMKLeS',}
'12.1.2511': '1gPiO2P_mF0wpLX-2g5oFBqi4QS630wKM',
'12.1.2511.1': '1yv4EZZKrfPgI-RWggMfBANtx6dL8owhA',loadDocument(docId, version);
}
'12.1.2511.3': '14Zd-Npn6VGioc1wsokDL4vfPRVzhb-AY',
'12.1.2511.4': '1VjoqjmjqCokx4Kv5QDTDa9wZsF1QwICY', function showWarning(version) {
'12.1.2511.5': '1evpMFJmgDUFX__dC6W83LZqKQXjmy88s',document.getElementById('warning').style.display = 'block';
'12.1.2511.6': '1_e3AgOsc9Oqy-JoZhus-zyU-961karvw',
document.getElementById('warning').innerHTML =
'12.1.2511.7': '19TKZ4fYof03H0pdzldQnV7_ZYjxowkNr',
`⚠️ <strong>Documento não encontrado para versão ${version}</strong><br>` +
'12.1.2511.8': '12ivR5sJUwVwcRJr0Q_aHBT_y4JwlnTd4',
'12.1.2511.9': '1Exio4F5z2lo6HnEnLpkDquuu8HUiD3C-',
'12.1.2511.10': '1NRs4aZct5OVmSiXDPgMmUw9iFURlC6Od',`O documento pode ainda não ter sido criado no Google Drive ou o mapeamento precisa ser atualizado.<br>` +
'12.1.2511.11': '1AAOtpmIahaHaYYUtUFL3OJGJ07dTKLU_',
`Verifique se existe um Google Doc com o nome "${version}" ou "${version}.txt" na '12.1.2511.12': '1c19qwsUQdWb_H58qcamAQ6Fz9Bwg78Bs',pasta.`;
'12.1.2511.13': '1CS-VXZJLzPSBjov0r4JVAcTPE5daaE4M',
document.getElementById('loading').style.display = 'none';
}
'12.1.2511.14': '1dei-4_gijuPsGzSQKZpIh9DMCYJ2pw8j',
function '12.1.2511.15': '1qDv9Zm_0CJiKl6iJBzxVxwFCoHNZBky4',loadDocument(docId, version) {
'12.1.2511.16': '1H51vcp3ierWZE0XB1QEtzUnm0J-0uEVp',
// Construir URL do Google Doc
'12.1.2511.17': '1OwFzjD6j4_OlDi9x7f5xqqoBo_eKY1rd',
const googleDocUrl '12.1.2511.18': '1iaMmEP6yDzHR4oTM_SjM2obkaUz1zrBA',
= `https://docs.google.com/document/d/${docId}/edit?usp=sharing`;
const previewUrl '12.1.2603.1': '19iieXcJNDoIM8lp09Zd-faD22AWepfTC',= `https://docs.google.com/document/d/${docId}/preview`;
'12.1.2603.2': '1DFR1cWRUVm3PsPQsVbuJySIjxMIy085L',
'12.1.2603.3': '1PLCl8hhtuvnW8Q9WDug9NH9F_qO-CUoq',
// Criar links
const linksContainer = '12.1.2603.4': '1qFmELYGulpQizNrXFBCpHdcLOSC5LrsZ',document.getElementById('links-container');
'12.1.2603.5': '1Q8ZSMOooNeSgmfdEucEsRO6P8z370enZ',linksContainer.innerHTML = `
'12.1.2603.6': '1P5-nq151raX-NhYufnTRrZMZyeAKsSp2',
<a href="${googleDocUrl}" target="_blank">📄 Abrir no Google Docs</a>
'12.1.2603.7': '1VfNdP7lRvi37ZKSOzX1KyEp6dK_t0I-N',
'12.1.2603.8': '1pxJPuMKfOWXrkwS7zzmm_3i_GerA44Zi',
<a href="https://drive.google.com/drive/folders/141aJRhZeYZca4QCBnou6-00WzRLkBYbs" target="_blank">📁 Pasta Release Notes</a>
'12.1.2603.9': '1evoXM_3WvL4SGVkwB8EYgwXuD6E4Asmw', <a href="https://tdn.totvs.com/pages/viewpage.action?pageId=649987902" target="_blank">📚 Release Notes Principal</a>
'12.1.2603.10': '18tytubaH1oywQoWyAycMM-qMq_347CHb',`;
'12.1.2603.11': '1ORyeFI8qYQynt20Ud66XLKewYQoVdLA6',
'12.1.2603.12': '1gDfH7fyZSUGl90ikqO3yXsZGm_EXC4PW',
// Criar Widget Connector ou iframe
const placeholder = '12.1.2607.1': '1ruRPs4fBJrKpLoECMGh0X5Ca4Bc_hfPb',document.getElementById('widget-placeholder');
'12.1.2607.2': '1njYTB38Ts6_dAZKvkqdvdQcPx99HTRml',
// Verificar '12.1.2607.3': '1uQR-2_JLet0Cyo7K6XaClDaXqxBu7udV',
se está em modo de edição do Confluence
'12.1.2607.4': '1G41yiKUzoWgIrbQATlhYntb73FSH9U76',
const isEditMode = window.location.href.includes('editpage.action') ||
'12.1.2607.5': '1_BfY0poM0AeAFy39vK-XZmBhEafIzzBf',
'12window.1location.2607href.6includes(': '1cm7WuMWrQYjGDdeMdmdAqIFX5ugROaHY',edit');
};
if (isEditMode) {
// Função para extrair versão do título "Dicionário de Dados 12.1.2503.14"
// Modo de edição: mostrar functioncódigo getPageVersion() {
do macro Widget Connector
const versionPattern = /(\d+\.\d+\.\d+(?:\.\d+)?)/;
const widgetCode = `<ac:structured-macro ac:name="widget" ac:schema-version="1">
<ac:parameter ac:name="url">${googleDocUrl}</ac:parameter>
<ac:parameter ac:name="width">100%</ac:parameter>
<ac:parameter ac:name="height">800</ac:parameter>
</ac:structured-macro>`;
// Método 1: Título da página (Confluence)
const selectors = [
placeholder.innerHTML = `
'h1#title-text',
<div style="background: #f4f5f7; padding: 15px; border-radius: 5px; margin: '.page-title',10px 0;">
'h1',
<p><strong>📋 Código do '[data-page-title]'Widget Connector:</strong></p>
];
<pre style="background: white; padding:
for (const selector of selectors) {
const element = document.querySelector(selector);
if (element) {
const text = element.textContent.trim();
const match = text.match(versionPattern);
if (match) {
return match[1];
}
}
}
// Método 2: Meta tags
const metaTitle = document.querySelector('meta[property="og:title"], meta[name="title"]');
if (metaTitle) {
const titleText = metaTitle.getAttribute('content') || '';
const match = titleText.match(versionPattern);
if (match) {
return match[1];
}
}
// Método 3: document.title
const titleMatch = document.title.match(versionPattern);
if (titleMatch) {
return titleMatch[1];
}
// Método 4: URL (fallback)
const urlParams = new URLSearchParams(window.location.search);
const titleParam = urlParams.get('title');
if (titleParam) {
const match = decodeURIComponent(titleParam).match(versionPattern);
if (match) {
return match[1];
}
}
return null;
}
// Obter versão
const version = getPageVersion();
const container = document.getElementById('widget-container');
if (!version) {
container.innerHTML = `
<div class="message-box error">
<span class="message-icon">❌</span>
<h2>Versão não identificada</h2>
<p>Certifique-se de que o título da página contém a versão no formato:<br>
<strong>"Dicionário de Dados 12.1.2503.14"</strong></p>
</div>
`;
return;
}
// Atualizar display
document.getElementById('version-display').textContent = version;
document.getElementById('page-title').textContent = `Dicionário de Dados ${version}`;
document.getElementById('last-update').textContent = new Date().toLocaleString('pt-BR');
// Obter Document ID
const docId = versionToDocId[version];
if (!docId) {
container.innerHTML = `
<div class="message-box">
<span class="message-icon">📋</span>
<h2>Release Notes ainda não foi expedido para essa versão</h2>
<p>O Release Notes para a versão <strong>${version}</strong> ainda não foi expedido.<br>
Aguarde a expedição ou verifique se a versão está correta.</p>
</div>
`;
return;
}
// Construir URL do Google Doc
const googleDocUrl = `https://docs.google.com/document/d/${docId}/edit?usp=sharing`;
const previewUrl = `https://docs.google.com/document/d/${docId}/preview`;
// Adicionar link para abrir documento
const docLink = document.getElementById('doc-link');
if (docLink) {
docLink.href = googleDocUrl;
docLink.style.display = 'inline-flex';
}
// Verificar se está em modo de edição (Confluence)
if (window.location.href.includes('editpage.action') || window.location.href.includes('edit')) {
// Modo de edição: mostrar código do macro Widget Connector
10px; border-radius: 3px; overflow-x: auto; font-size: 12px;">${widgetCode}</pre>
const widgetCode = `<ac:structured-macro ac:name="widget" ac:schema-version="1">
<ac:parameter ac:name="url">${googleDocUrl}</ac:parameter>
<ac:parameter ac:name="width">100%</ac:parameter>
<ac:parameter ac:name="height">800</ac:parameter>
</ac:structured-macro>`;
<p style="margin-top: 10px; font-size: 12px; color: #666;">
💡 <strong>Instruções:</strong> Copie o código acima e cole no editor do Confluence usando o macro "Widget container.innerHTML = `
Connector".
<div style="padding: 30px 40px;">
</p>
</div>
<div style="background: #f4f5f7; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
`;
} <h3 style="margin-bottom: 15px; color: #495057;">📋 Código do Widget Connector:</h3>
else {
// Modo de visualização: usar iframe
<pre style="background: white; padding: 15px; border-radius: 5px; overflow-x: auto; font-size: 13px; border: 1px solid #dee2e6;">${widgetCode}</pre> const iframe = document.createElement('iframe');
iframe.src = previewUrl;
</div>
iframe.width = '100%';
<p style="color: #6c757d; font-size: 14px;">
iframe.height = '800';
💡 <strong>Instruções:</strong> Copie o código acima e cole no editor do Confluence usando o macro "Widget Connector".
iframe.style.border = 'none';
iframe.style.borderRadius = '5px';
</p>
iframe.allow = 'fullscreen';
</div>
iframe.title = `Dicionário de Dados ${version}`;
} else {
// Modo de visualização: usar iframe
placeholder.appendChild(iframe);
const iframe = document.createElement('iframe');
}
iframe.src = previewUrl;
iframe.widthdocument.getElementById('loading').style.display = '100%none';
}
iframe.height = '800';
iframe.allow = 'fullscreen';
// Executar quando a página carregar
if iframe(document.titlereadyState === `Dicionário de Dados ${version}`;
'loading') {
document.addEventListener('DOMContentLoaded', init);
} container.innerHTML = '';else {
container.appendChildinit(iframe);
}
})();
</script>
</body>
</html>
|
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas