Initial commit: ArchiTools modular dashboard platform
Complete Next.js 16 application with 13 fully implemented modules: Email Signature, Word XML Generator, Registratura, Dashboard, Tag Manager, IT Inventory, Address Book, Password Vault, Mini Utilities, Prompt Generator, Digital Signatures, Word Templates, and AI Chat. Includes core platform systems (module registry, feature flags, storage abstraction, i18n, theming, auth stub, tagging), 16 technical documentation files, Docker deployment config, and legacy HTML tool reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
151
legacy/wordXMLgenerator/word-xml-generator-basic.html
Normal file
151
legacy/wordXMLgenerator/word-xml-generator-basic.html
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ro">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Generator XML Word – Versiune Extinsă</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
font-family: system-ui, sans-serif;
|
||||
padding: 1.5rem;
|
||||
background: #0f172a;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
.card {
|
||||
background: #020617;
|
||||
border-radius: 1rem;
|
||||
padding: 1.25rem;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
||||
border: 1px solid #1e293b;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
label { font-size: .85rem; color: #94a3b8; }
|
||||
input, textarea {
|
||||
width: 100%; padding: .55rem .7rem;
|
||||
border-radius: .5rem; border: 1px solid #334155;
|
||||
background: #020617; color: #e5e7eb;
|
||||
}
|
||||
textarea { min-height: 120px; }
|
||||
button {
|
||||
padding: .6rem 1.2rem; border-radius: 999px; border: none;
|
||||
background: linear-gradient(135deg,#38bdf8,#6366f1);
|
||||
font-weight: 600; color: white; cursor: pointer;
|
||||
}
|
||||
pre {
|
||||
background: #000; padding: .8rem; border-radius: .7rem;
|
||||
border: 1px solid #1e293b; max-height: 350px; overflow: auto;
|
||||
font-size: .85rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Generator Word XML – Varianta Extinsă (cu Short / Upper / Lower / Initials)</h1>
|
||||
|
||||
<div class="card">
|
||||
<label>Namespace URI</label>
|
||||
<input id="nsUri" value="http://schemas.beletage.ro/word/contract">
|
||||
|
||||
<label style="margin-top:1rem;">Element rădăcină</label>
|
||||
<input id="rootElement" value="ContractData">
|
||||
|
||||
<label style="margin-top:1rem;">Lista de câmpuri (unul pe linie)</label>
|
||||
<textarea id="fieldList">NumeClient
|
||||
TitluProiect
|
||||
Adresa</textarea>
|
||||
|
||||
<button onclick="generateXML()" style="margin-top:1rem;">Generează XML complet</button>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Custom XML Part (item1.xml)</h3>
|
||||
<pre id="xmlOutput"></pre>
|
||||
<button onclick="downloadXML()">Descarcă XML</button>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>XPaths pentru mapping</h3>
|
||||
<pre id="xpathOutput"></pre>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function sanitize(name) {
|
||||
if (!name) return null;
|
||||
let n = name.trim();
|
||||
if (!n) return null;
|
||||
n = n.replace(/\s+/g,"_").replace(/[^A-Za-z0-9_.-]/g,"");
|
||||
if (!/^[A-Za-z_]/.test(n)) n = "_" + n;
|
||||
return n;
|
||||
}
|
||||
|
||||
function initials(str) {
|
||||
return str.split(/\s+/).map(s => s[0]?.toUpperCase() + ".").join("");
|
||||
}
|
||||
|
||||
function generateXML() {
|
||||
const ns = document.getElementById("nsUri").value.trim();
|
||||
const root = sanitize(document.getElementById("rootElement").value) || "Root";
|
||||
const fieldRaw = document.getElementById("fieldList").value;
|
||||
|
||||
const lines = fieldRaw.split(/\r?\n/)
|
||||
.map(l => l.trim()).filter(l => l.length);
|
||||
|
||||
const fields = [];
|
||||
|
||||
for (let l of lines) {
|
||||
const base = sanitize(l);
|
||||
if (!base) continue;
|
||||
|
||||
fields.push({
|
||||
base,
|
||||
variants: [
|
||||
base, // original
|
||||
base + "Short", // prescurtat
|
||||
base + "Upper", // caps
|
||||
base + "Lower", // lowercase
|
||||
base + "Initials", // inițiale
|
||||
base + "First" // primul cuvânt
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// === GENERĂM XML ===
|
||||
let xml = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
||||
xml += `<${root} xmlns="${ns}">\n`;
|
||||
|
||||
for (const f of fields) {
|
||||
for (const v of f.variants) {
|
||||
xml += ` <${v}></${v}>\n`;
|
||||
}
|
||||
}
|
||||
|
||||
xml += `</${root}>`;
|
||||
|
||||
document.getElementById("xmlOutput").textContent = xml;
|
||||
|
||||
// === GENERĂM XPATHS ===
|
||||
let xp = `Namespace: ${ns}\nRoot: /${root}\n\n`;
|
||||
for (const f of fields) {
|
||||
xp += `# ${f.base}\n`;
|
||||
xp += `/${root}/${f.base}\n`;
|
||||
xp += `/${root}/${f.base}Short\n`;
|
||||
xp += `/${root}/${f.base}Upper\n`;
|
||||
xp += `/${root}/${f.base}Lower\n`;
|
||||
xp += `/${root}/${f.base}Initials\n`;
|
||||
xp += `/${root}/${f.base}First\n\n`;
|
||||
}
|
||||
document.getElementById("xpathOutput").textContent = xp;
|
||||
}
|
||||
|
||||
function downloadXML() {
|
||||
const text = document.getElementById("xmlOutput").textContent;
|
||||
const blob = new Blob([text], { type: "application/xml" });
|
||||
const a = document.createElement("a");
|
||||
a.href = URL.createObjectURL(blob);
|
||||
a.download = "item1.xml";
|
||||
a.click();
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user