@nice2dev/ui-bi 1.0.22 → 1.0.23
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.
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +1 -4
- package/dist/index.mjs +558 -2017
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),Z=(a,r)=>r,X=s.createContext(Z);function Y(){return{t:s.useContext(X)}}s.createContext({dir:"ltr",isRTL:!1,flip:a=>a,value:a=>a.ltr});s.createContext(null);s.createContext(null);const Q={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"};s.createContext({displayStyle:"default",variantConfig:Q,setDisplayStyle:()=>{}});s.createContext({});s.createContext({direction:"ltr",isRTL:!1,flip:a=>a,flipStyle:(a,r)=>({[a]:r})});s.createContext({permissions:{},getAccessMode:()=>"full"});s.createContext(null);const ee=process.env.NODE_ENV==="development";let L={enabled:ee,slowRenderThreshold:16};const M=[],R=new Map,F=new Map;function re(){M.length=0,R.clear(),F.clear()}function ae(a){const r=L.slowRenderThreshold;return M.filter(c=>c.actualDuration>r)}function x(a){return a<1?`${(a*1e3).toFixed(0)}μs`:a<1e3?`${a.toFixed(2)}ms`:`${(a/1e3).toFixed(2)}s`}function ie(){const a=Array.from(R.values()),r=ae(),c=a.reduce((u,t)=>u+t.renderCount,0),d=a.length>0?a.reduce((u,t)=>u+t.avgRenderTime,0)/a.length:0,y=Array.from(F.values());return{stats:a,slowRenders:r,totalRenders:c,avgRenderTime:d,marks:y}}function ne(){const a=ie();console.group("%c[Nice2Dev Performance Report]","color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"),console.log(`Total renders: ${a.totalRenders}`),console.log(`Average render time: ${x(a.avgRenderTime)}`),console.log(`Slow renders: ${a.slowRenders.length}`),console.group("Component Stats"),console.table(a.stats.sort((r,c)=>c.totalRenderTime-r.totalRenderTime).map(r=>({Name:r.componentName,Renders:r.renderCount,"Avg Time":x(r.avgRenderTime),"Max Time":x(r.maxRenderTime),"Total Time":x(r.totalRenderTime),"Slow Renders":r.slowRenderCount}))),console.groupEnd(),a.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(a.slowRenders.slice(-10).map(r=>({Component:r.componentName,Phase:r.phase,Duration:x(r.actualDuration),Time:new Date(r.timestamp).toLocaleTimeString()}))),console.groupEnd()),a.marks.length>0&&(console.group("Custom Marks"),console.table(a.marks.filter(r=>r.duration).map(r=>({Name:r.name,Duration:x(r.duration)}))),console.groupEnd()),console.groupEnd()}const ce=s.memo(({position:a="bottom-right",defaultCollapsed:r=!0})=>{const[c,d]=s.useState(r),[y,u]=s.useState([]),[t,p]=s.useState({used:0,total:0});if(s.useEffect(()=>{const o=()=>{const g=Array.from(R.values());u(g.sort((_,H)=>H.totalRenderTime-_.totalRenderTime).slice(0,10));const j=window.performance;j.memory&&p({used:j.memory.usedJSHeapSize/1024/1024,total:j.memory.totalJSHeapSize/1024/1024})};o();const b=setInterval(o,2e3);return()=>clearInterval(b)},[]),!L.enabled)return null;const w={position:"fixed",zIndex:99999,...a.includes("top")?{top:8}:{bottom:8},...a.includes("left")?{left:8}:{right:8}};return e.jsxs("div",{style:{...w,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--bg-primary, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:c?"4px 8px":8,maxWidth:c?"auto":300,maxHeight:c?"auto":400,overflow:"auto"},children:[e.jsxs("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>d(o=>!o),children:[e.jsx("span",{style:{color:"var(--color-success, #22c55e)"},children:"●"}),e.jsx("span",{children:"Profiler"}),t.used>0&&e.jsxs("span",{style:{color:t.used>100?"var(--color-warning, #f59e0b)":"var(--text-muted, #64748b)"},children:[t.used.toFixed(0),"MB"]}),e.jsx("span",{style:{marginLeft:"auto",opacity:.5},children:c?"▼":"▲"})]}),!c&&e.jsxs("div",{style:{marginTop:8},children:[e.jsx("div",{style:{borderBottom:"1px solid var(--border-color, #333)",paddingBottom:4,marginBottom:8},children:e.jsx("strong",{children:"Top Components"})}),y.map(o=>e.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[e.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:o.componentName}),e.jsx("span",{style:{color:o.avgRenderTime>16?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"},children:x(o.avgRenderTime)}),e.jsxs("span",{style:{color:"var(--text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",o.renderCount]})]},o.componentName)),e.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[e.jsx("button",{onClick:ne,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Print Report"}),e.jsx("button",{onClick:re,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Clear"})]})]})]})});ce.displayName="ProfilerOverlay";process.env.NODE_ENV;s.createContext(null);const te=s.createContext({enabled:!0,active:!1,run:()=>{}});function se(){return s.useContext(te)}function de(a,r){if(!a)return null;if(a===!0)return r&&r.length>0?r:null;if(Array.isArray(a))return a.length>0?a:null;const c=a.steps??r;return c&&c.length>0?c:null}function oe(a,r){return a.map(c=>({target:c.target,title:c.titleKey?r(c.titleKey,c.title??""):c.title??"",content:c.contentKey?r(c.contentKey,c.content??""):c.content??"",placement:c.placement,highlightPadding:c.highlightPadding,showArrow:c.showArrow,scrollIntoView:c.scrollIntoView,disableInteraction:c.disableInteraction}))}const fe=({steps:a,autoStart:r,label:c,size:d="md",className:y,style:u,"data-testid":t})=>{const{enabled:p,run:w}=se(),{t:o}=Y();if(!p||!a||a.length===0)return null;const b=c??o("tutorial.startAria","Start tutorial");return e.jsx("button",{type:"button",className:`nice-tutorial-button nice-tutorial-button--${d}`+(y?` ${y}`:""),style:u,"data-testid":t,"aria-label":b,title:b,onClick:()=>w(oe(a,o),{autoStart:r}),children:"?"})},P="nice-tutorial-button-styles";if(typeof document<"u"&&!document.getElementById(P)){const a=document.createElement("style");a.id=P,a.textContent=`
|
|
2
2
|
.nice-tutorial-button {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
}
|
|
25
25
|
.nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
|
|
26
26
|
.nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
|
|
27
|
-
`,document.head.appendChild(r)}m.createContext(null);m.createContext(null);m.createContext(null);const G={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},J={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},Q={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},Z=r=>({color:r,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),pe={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},me={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function l(r,a,i,o,n){return{name:r,darkMode:"light",colors:{...a,surface:a.surface??i.primary,surfaceHover:a.surfaceHover??i.secondary},backgrounds:{...i,elevated:i.elevated??i.primary,inset:i.inset??i.tertiary,canvas:i.canvas??i.primary},text:{...o,inverse:o.inverse??"#ffffff"},borders:Z(n),shadows:pe,spacing:G,typography:J,transitions:Q}}function C(r,a,i,o,n){return{name:r,darkMode:"dark",colors:{...a,surface:a.surface??i.secondary,surfaceHover:a.surfaceHover??i.tertiary},backgrounds:{...i,elevated:i.elevated??i.secondary,inset:i.inset??i.primary,canvas:i.canvas??i.primary},text:{...o,inverse:o.inverse??"#0f172a"},borders:Z(n),shadows:me,spacing:G,typography:J,transitions:Q}}l("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1");l("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8");l("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");l("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db");l("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8");l("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1");l("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db");l("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4");l("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af");l("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7");l("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d");l("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");l("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");l("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc");l("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9");l("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264");l("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4");l("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74");l("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9");l("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc");l("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af");l("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74");C("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b");C("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46");C("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266");C("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626");C("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252");C("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563"},"#374151");C("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87");C("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985");C("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040");C("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857");l("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");l("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc");l("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047");l("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74");l("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");l("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe");l("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5");l("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac");l("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");l("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");l("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4");l("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");l("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0");l("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa");l("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe");l("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a");l("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0");l("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3");l("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1");l("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb");l("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");l("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");l("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd");l("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1");l("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");l("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d");l("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9");C("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a");l("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5");C("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75"},"#073642");C("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32");C("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452");C("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866");l("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8");C("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300");l("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8");l("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4");C("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72"},"#1c3a44");C("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333");C("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66");l("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");C("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28"},"#5c3400");l("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af");l("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe");l("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d");l("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe");l("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8");l("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d");l("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0");l("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0");l("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb");l("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe");l("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5");l("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d");l("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");l("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896");C("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff");l("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0");l("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c");l("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5");C("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e");C("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58");l("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8");l("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");m.createContext(null);const ye=[{target:".nice-report-builder",titleKey:"tutorial.biReportBuilder.intro.title",title:"Report builder",contentKey:"tutorial.biReportBuilder.intro.content",content:"Drag elements from the palette onto the report, bind them to data sources, switch design/preview, then export to PDF or Excel.",placement:"auto"}],be={id:"",name:"New Report",dataSource:"",layout:{type:"table",elements:[],pageSize:"A4",orientation:"portrait"},parameters:[],filters:[],sorting:[],grouping:[],calculations:[],formatting:{conditionalFormats:[],alternateRowColors:!0,gridLines:!0}},W=[{type:"table",label:"Table",icon:"📊"},{type:"chart",label:"Chart",icon:"📈"},{type:"text",label:"Text",icon:"📝"},{type:"image",label:"Image",icon:"🖼️"},{type:"shape",label:"Shape",icon:"⬜"},{type:"barcode",label:"Barcode",icon:"▮▯▮"},{type:"qrcode",label:"QR Code",icon:"⊞"},{type:"subreport",label:"Subreport",icon:"📋"},{type:"page-break",label:"Page Break",icon:"📄"}];function he({report:r,dataSources:a=[],onChange:i,onPreview:o,onExport:n,className:f="",tutorial:p}){const[s,x]=m.useState(r||{...be,id:crypto.randomUUID()}),[c,h]=m.useState(null),[d,v]=m.useState("design"),[H,k]=m.useState(null),[T,w]=m.useState(100),S=m.useCallback(t=>{x(b=>{const g=t(b);return i==null||i(g),g})},[i]),R=m.useCallback((t,b)=>{const g={id:crypto.randomUUID(),type:t,position:{x:b.x,y:b.y,width:200,height:t==="page-break"?20:100},config:xe(t),style:{}};S(D=>({...D,layout:{...D.layout,elements:[...D.layout.elements,g]}})),h(g)},[S]),E=m.useCallback((t,b)=>{S(g=>({...g,layout:{...g.layout,elements:g.layout.elements.map(D=>D.id===t?{...D,...b}:D)}})),(c==null?void 0:c.id)===t&&h(g=>g?{...g,...b}:null)},[S,c]),N=m.useCallback(t=>{S(b=>({...b,layout:{...b.layout,elements:b.layout.elements.filter(g=>g.id!==t)}})),h(null)},[S]),M=m.useCallback(t=>{if(t.preventDefault(),!H)return;const b=t.currentTarget.getBoundingClientRect(),g=(t.clientX-b.left)*(100/T),D=(t.clientY-b.top)*(100/T);R(H,{x:g,y:D}),k(null)},[H,R,T]),P=m.useCallback(()=>{o==null||o(s)},[s,o]),L=m.useCallback(t=>{n==null||n(s,t)},[s,n]),y=a.find(t=>t.id===s.dataSource);return e.jsxs("div",{className:`nice-report-builder ${f}`,children:[e.jsxs("div",{className:"nice-report-builder__toolbar",children:[e.jsx("input",{type:"text",value:s.name,onChange:t=>S(b=>({...b,name:t.target.value})),className:"nice-report-builder__name-input"}),e.jsx("div",{className:"nice-report-builder__tabs",children:["design","data","parameters","formatting"].map(t=>e.jsx("button",{className:`nice-report-builder__tab ${d===t?"nice-report-builder__tab--active":""}`,onClick:()=>v(t),children:t.charAt(0).toUpperCase()+t.slice(1)},t))}),e.jsxs("div",{className:"nice-report-builder__zoom",children:[e.jsx("button",{onClick:()=>w(t=>Math.max(25,t-25)),children:"−"}),e.jsxs("span",{children:[T,"%"]}),e.jsx("button",{onClick:()=>w(t=>Math.min(200,t+25)),children:"+"})]}),e.jsxs("div",{className:"nice-report-builder__actions",children:[e.jsx("button",{onClick:P,children:"👁 Preview"}),e.jsx("button",{onClick:()=>L("pdf"),children:"📄 PDF"}),e.jsx("button",{onClick:()=>L("excel"),children:"📊 Excel"}),e.jsx(V,{steps:O(p,ye)})]})]}),e.jsxs("div",{className:"nice-report-builder__main",children:[d==="design"&&e.jsxs("div",{className:"nice-report-builder__palette",children:[e.jsx("h4",{children:"Elements"}),W.map(t=>e.jsxs("div",{className:"nice-report-builder__palette-item",draggable:!0,onDragStart:()=>k(t.type),onDragEnd:()=>k(null),children:[e.jsx("span",{className:"nice-report-builder__palette-icon",children:t.icon}),e.jsx("span",{children:t.label})]},t.type)),e.jsx("h4",{children:"Data Source"}),e.jsxs("select",{value:s.dataSource,onChange:t=>S(b=>({...b,dataSource:t.target.value})),children:[e.jsx("option",{value:"",children:"Select data source..."}),a.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))]}),(y==null?void 0:y.schema)&&e.jsxs("div",{className:"nice-report-builder__fields",children:[e.jsx("h5",{children:"Fields"}),y.schema.tables.map(t=>e.jsxs("div",{className:"nice-report-builder__table-fields",children:[e.jsx("strong",{children:t.name}),t.columns.map(b=>e.jsxs("div",{className:"nice-report-builder__field",draggable:!0,onDragStart:()=>{},children:[b.name," ",e.jsxs("small",{children:["(",b.type,")"]})]},b.name))]},t.name))]})]}),d==="design"&&e.jsx("div",{className:"nice-report-builder__canvas-container",children:e.jsxs("div",{className:"nice-report-builder__canvas",style:{transform:`scale(${T/100})`,transformOrigin:"top left",width:s.layout.orientation==="landscape"?"297mm":"210mm",height:s.layout.orientation==="landscape"?"210mm":"297mm"},onDragOver:t=>t.preventDefault(),onDrop:M,onClick:()=>h(null),children:[s.layout.elements.map(t=>e.jsx(ve,{element:t,isSelected:(c==null?void 0:c.id)===t.id,onSelect:()=>h(t),onUpdate:b=>E(t.id,b),onDelete:()=>N(t.id)},t.id)),s.layout.elements.length===0&&e.jsx("div",{className:"nice-report-builder__canvas-empty",children:"Drag elements here to build your report"})]})}),d==="data"&&e.jsx(ge,{report:s,dataSource:y,onChange:t=>S(b=>({...b,query:t}))}),d==="parameters"&&e.jsx(je,{parameters:s.parameters,calculations:s.calculations,onChange:(t,b)=>S(g=>({...g,parameters:t,calculations:b}))}),d==="formatting"&&e.jsx(_e,{formatting:s.formatting,grouping:s.grouping,sorting:s.sorting,onChange:(t,b,g)=>S(D=>({...D,formatting:t,grouping:b,sorting:g}))}),c&&d==="design"&&e.jsx(we,{element:c,dataSource:y,onChange:t=>E(c.id,t),onClose:()=>h(null)})]})]})}function xe(r){switch(r){case"table":return{columns:[],showHeader:!0,showFooter:!1};case"chart":return{chartType:"bar",series:[],axes:[]};case"text":return{content:"Text",fontSize:12};case"image":return{src:"",fit:"contain"};case"shape":return{shape:"rectangle",fill:"var(--nice-border, #e0e0e0)",stroke:"var(--nice-text, #333)"};case"barcode":return{format:"CODE128",value:""};case"qrcode":return{value:""};case"subreport":return{reportId:""};case"page-break":return{};default:return{}}}function ve({element:r,isSelected:a,onSelect:i,onUpdate:o,onDelete:n}){var T;const[f,p]=m.useState(!1),[s,x]=m.useState(!1),c=w=>{if(w.button!==0)return;w.stopPropagation(),i(),p(!0);const S=w.clientX,R=w.clientY,E={...r.position},N=P=>{const L=P.clientX-S,y=P.clientY-R;o({position:{...E,x:Math.max(0,E.x+L),y:Math.max(0,E.y+y)}})},M=()=>{p(!1),window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",M)};window.addEventListener("mousemove",N),window.addEventListener("mouseup",M)},h=(w,S)=>{w.stopPropagation(),x(!0);const R=w.clientX,E=w.clientY,N={...r.position},M=L=>{const y=L.clientX-R,t=L.clientY-E,b={...N};S.includes("e")&&(b.width=Math.max(50,N.width+y)),S.includes("s")&&(b.height=Math.max(30,N.height+t)),S.includes("w")&&(b.x=N.x+y,b.width=Math.max(50,N.width-y)),S.includes("n")&&(b.y=N.y+t,b.height=Math.max(30,N.height-t)),o({position:b})},P=()=>{x(!1),window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",P)};window.addEventListener("mousemove",M),window.addEventListener("mouseup",P)},d=W.find(w=>w.type===r.type),{padding:v,...H}=r.style??{},k=typeof v=="object"&&v!==null?`${v.top}px ${v.right}px ${v.bottom}px ${v.left}px`:v;return e.jsxs("div",{className:`nice-report-builder__element nice-report-builder__element--${r.type} ${a?"nice-report-builder__element--selected":""}`,style:{left:r.position.x,top:r.position.y,width:r.position.width,height:r.position.height,...H,padding:k},onMouseDown:c,children:[e.jsxs("div",{className:"nice-report-builder__element-content",children:[e.jsx("span",{className:"nice-report-builder__element-icon",children:d==null?void 0:d.icon}),e.jsx("span",{className:"nice-report-builder__element-label",children:((T=r.binding)==null?void 0:T.field)||(d==null?void 0:d.label)})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"nice-report-builder__element-delete",onClick:w=>{w.stopPropagation(),n()},children:"×"}),e.jsx("div",{className:"nice-report-builder__resize-handle nice-report-builder__resize-handle--se",onMouseDown:w=>h(w,"se")}),e.jsx("div",{className:"nice-report-builder__resize-handle nice-report-builder__resize-handle--e",onMouseDown:w=>h(w,"e")}),e.jsx("div",{className:"nice-report-builder__resize-handle nice-report-builder__resize-handle--s",onMouseDown:w=>h(w,"s")})]})]})}function ge({report:r,dataSource:a,onChange:i}){var f,p,s,x;const[o,n]=m.useState("builder");return e.jsxs("div",{className:"nice-report-builder__query-builder",children:[e.jsxs("div",{className:"nice-report-builder__query-tabs",children:[e.jsx("button",{className:o==="builder"?"active":"",onClick:()=>n("builder"),children:"Query Builder"}),e.jsx("button",{className:o==="sql"?"active":"",onClick:()=>n("sql"),children:"SQL"})]}),o==="builder"?e.jsxs("div",{className:"nice-report-builder__visual-query",children:[e.jsx("h4",{children:"Tables"}),(f=a==null?void 0:a.schema)==null?void 0:f.tables.map(c=>{var h,d;return e.jsx("div",{className:"nice-report-builder__query-table",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:((d=(h=r.query)==null?void 0:h.tables)==null?void 0:d.includes(c.name))||!1,onChange:v=>{var k,T;const H=v.target.checked?[...((k=r.query)==null?void 0:k.tables)||[],c.name]:(((T=r.query)==null?void 0:T.tables)||[]).filter(w=>w!==c.name);i({...r.query,type:"builder",tables:H})}}),c.name]})},c.name)}),e.jsx("h4",{children:"Columns"}),e.jsx("div",{className:"nice-report-builder__column-list",children:(s=(p=r.query)==null?void 0:p.tables)==null?void 0:s.map(c=>{var d;const h=(d=a==null?void 0:a.schema)==null?void 0:d.tables.find(v=>v.name===c);return h==null?void 0:h.columns.map(v=>e.jsxs("div",{className:"nice-report-builder__column-item",children:[e.jsx("input",{type:"checkbox"}),e.jsxs("span",{children:[c,".",v.name]}),e.jsxs("select",{children:[e.jsx("option",{value:"",children:"No aggregate"}),e.jsx("option",{value:"sum",children:"SUM"}),e.jsx("option",{value:"avg",children:"AVG"}),e.jsx("option",{value:"count",children:"COUNT"}),e.jsx("option",{value:"min",children:"MIN"}),e.jsx("option",{value:"max",children:"MAX"})]})]},`${c}.${v.name}`))})})]}):e.jsx("div",{className:"nice-report-builder__sql-editor",children:e.jsx("textarea",{value:((x=r.query)==null?void 0:x.text)||"",onChange:c=>i({...r.query,type:"sql",text:c.target.value}),placeholder:"SELECT * FROM table_name",rows:15})})]})}function je({parameters:r,calculations:a,onChange:i}){const o=()=>{const f={id:crypto.randomUUID(),name:"param"+(r.length+1),label:"Parameter "+(r.length+1),type:"text"};i([...r,f],a)},n=()=>{const f={id:crypto.randomUUID(),name:"calc"+(a.length+1),expression:""};i(r,[...a,f])};return e.jsxs("div",{className:"nice-report-builder__parameters-editor",children:[e.jsxs("section",{children:[e.jsxs("div",{className:"nice-report-builder__section-header",children:[e.jsx("h4",{children:"Parameters"}),e.jsx("button",{onClick:o,children:"+ Add"})]}),r.map((f,p)=>e.jsxs("div",{className:"nice-report-builder__param-row",children:[e.jsx("input",{type:"text",value:f.name,placeholder:"Name",onChange:s=>{const x=[...r];x[p]={...f,name:s.target.value},i(x,a)}}),e.jsx("input",{type:"text",value:f.label,placeholder:"Label",onChange:s=>{const x=[...r];x[p]={...f,label:s.target.value},i(x,a)}}),e.jsxs("select",{value:f.type,onChange:s=>{const x=[...r];x[p]={...f,type:s.target.value},i(x,a)},children:[e.jsx("option",{value:"text",children:"Text"}),e.jsx("option",{value:"number",children:"Number"}),e.jsx("option",{value:"date",children:"Date"}),e.jsx("option",{value:"daterange",children:"Date Range"}),e.jsx("option",{value:"select",children:"Select"}),e.jsx("option",{value:"multiselect",children:"Multi-select"})]}),e.jsx("button",{onClick:()=>{i(r.filter(s=>s.id!==f.id),a)},children:"×"})]},f.id))]}),e.jsxs("section",{children:[e.jsxs("div",{className:"nice-report-builder__section-header",children:[e.jsx("h4",{children:"Calculated Fields"}),e.jsx("button",{onClick:n,children:"+ Add"})]}),a.map((f,p)=>e.jsxs("div",{className:"nice-report-builder__calc-row",children:[e.jsx("input",{type:"text",value:f.name,placeholder:"Name",onChange:s=>{const x=[...a];x[p]={...f,name:s.target.value},i(r,x)}}),e.jsx("input",{type:"text",value:f.expression,placeholder:"Expression (e.g., [Sales] * [Quantity])",onChange:s=>{const x=[...a];x[p]={...f,expression:s.target.value},i(r,x)}}),e.jsx("button",{onClick:()=>{i(r,a.filter(s=>s.id!==f.id))},children:"×"})]},f.id))]})]})}function _e({formatting:r,grouping:a,sorting:i,onChange:o}){return e.jsxs("div",{className:"nice-report-builder__formatting-editor",children:[e.jsxs("section",{children:[e.jsx("h4",{children:"General"}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:r.alternateRowColors,onChange:n=>o({...r,alternateRowColors:n.target.checked},a,i)}),"Alternate row colors"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:r.gridLines,onChange:n=>o({...r,gridLines:n.target.checked},a,i)}),"Show grid lines"]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:"Conditional Formatting"}),e.jsx("button",{onClick:()=>{const n={id:crypto.randomUUID(),condition:{column:"",operator:"gt",value:0},style:{backgroundColor:"#ffcccc"},scope:"cell"};o({...r,conditionalFormats:[...r.conditionalFormats,n]},a,i)},children:"+ Add Rule"}),r.conditionalFormats.map(n=>e.jsxs("div",{className:"nice-report-builder__format-rule",children:[e.jsxs("span",{children:["If column ",n.condition.operator," ",String(n.condition.value)]}),e.jsx("input",{type:"color",value:n.style.backgroundColor||"var(--nice-bg, #fff)",onChange:f=>{o({...r,conditionalFormats:r.conditionalFormats.map(p=>p.id===n.id?{...p,style:{...p.style,backgroundColor:f.target.value}}:p)},a,i)}})]},n.id))]})]})}function we({element:r,dataSource:a,onChange:i,onClose:o}){var n,f,p,s,x,c,h;return e.jsxs("div",{className:"nice-report-builder__properties",children:[e.jsxs("div",{className:"nice-report-builder__properties-header",children:[e.jsxs("h4",{children:[(n=W.find(d=>d.type===r.type))==null?void 0:n.label," Properties"]}),e.jsx("button",{onClick:o,children:"×"})]}),e.jsxs("div",{className:"nice-report-builder__properties-content",children:[e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Data Binding"}),e.jsxs("select",{value:((f=r.binding)==null?void 0:f.field)||"",onChange:d=>i({binding:{...r.binding,field:d.target.value}}),children:[e.jsx("option",{value:"",children:"None"}),(p=a==null?void 0:a.schema)==null?void 0:p.tables.flatMap(d=>d.columns.map(v=>e.jsxs("option",{value:`${d.name}.${v.name}`,children:[d.name,".",v.name]},`${d.name}.${v.name}`)))]})]}),e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Position"}),e.jsxs("div",{className:"nice-report-builder__position-inputs",children:[e.jsx("input",{type:"number",value:r.position.x,onChange:d=>i({position:{...r.position,x:parseInt(d.target.value,10)||0}}),placeholder:"X"}),e.jsx("input",{type:"number",value:r.position.y,onChange:d=>i({position:{...r.position,y:parseInt(d.target.value,10)||0}}),placeholder:"Y"}),e.jsx("input",{type:"number",value:r.position.width,onChange:d=>i({position:{...r.position,width:parseInt(d.target.value,10)||50}}),placeholder:"W"}),e.jsx("input",{type:"number",value:r.position.height,onChange:d=>i({position:{...r.position,height:parseInt(d.target.value,10)||30}}),placeholder:"H"})]})]}),e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Background Color"}),e.jsx("input",{type:"color",value:((s=r.style)==null?void 0:s.backgroundColor)||"var(--nice-bg, #fff)",onChange:d=>i({style:{...r.style,backgroundColor:d.target.value}})})]}),e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Border"}),e.jsxs("div",{className:"nice-report-builder__border-inputs",children:[e.jsx("input",{type:"color",value:((x=r.style)==null?void 0:x.borderColor)||"var(--nice-text, #000000)",onChange:d=>i({style:{...r.style,borderColor:d.target.value}})}),e.jsx("input",{type:"number",value:((c=r.style)==null?void 0:c.borderWidth)||0,onChange:d=>i({style:{...r.style,borderWidth:parseInt(d.target.value,10)||0}}),placeholder:"Width",min:0,max:10})]})]}),r.type==="text"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Content"}),e.jsx("textarea",{value:r.config.content||"",onChange:d=>i({config:{...r.config,content:d.target.value}}),rows:3})]}),e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Font Size"}),e.jsx("input",{type:"number",value:((h=r.style)==null?void 0:h.fontSize)||12,onChange:d=>i({style:{...r.style,fontSize:parseInt(d.target.value,10)||12}}),min:8,max:72})]})]}),r.type==="chart"&&e.jsxs("div",{className:"nice-report-builder__field",children:[e.jsx("label",{children:"Chart Type"}),e.jsxs("select",{value:r.config.chartType||"bar",onChange:d=>i({config:{...r.config,chartType:d.target.value}}),children:[e.jsx("option",{value:"bar",children:"Bar"}),e.jsx("option",{value:"line",children:"Line"}),e.jsx("option",{value:"pie",children:"Pie"}),e.jsx("option",{value:"area",children:"Area"}),e.jsx("option",{value:"scatter",children:"Scatter"})]})]})]})]})}const Ne=[{target:".nice-dashboard-studio",titleKey:"tutorial.dashboardStudio.intro.title",title:"Dashboard studio",contentKey:"tutorial.dashboardStudio.intro.content",content:"Drag widgets from the palette onto the grid, bind them to data sources, add filters, then toggle Edit/View, refresh and save.",placement:"auto"}],Se={id:"",name:"New Dashboard",layout:{type:"grid",columns:12,rowHeight:50,gap:8},widgets:[],filters:[]},$=[{type:"chart",label:"Chart",icon:"📈",category:"Visualization"},{type:"table",label:"Table",icon:"📊",category:"Visualization"},{type:"card",label:"KPI Card",icon:"🎯",category:"Visualization"},{type:"gauge",label:"Gauge",icon:"⏱️",category:"Visualization"},{type:"map",label:"Map",icon:"🗺️",category:"Visualization"},{type:"treemap",label:"Treemap",icon:"🌳",category:"Visualization"},{type:"funnel",label:"Funnel",icon:"🔻",category:"Visualization"},{type:"heatmap",label:"Heatmap",icon:"🌡️",category:"Visualization"},{type:"timeline",label:"Timeline",icon:"📅",category:"Visualization"},{type:"sankey",label:"Sankey",icon:"〰️",category:"Visualization"},{type:"filter",label:"Filter",icon:"🔍",category:"Controls"},{type:"slicer",label:"Slicer",icon:"📋",category:"Controls"},{type:"text",label:"Text",icon:"📝",category:"Layout"},{type:"image",label:"Image",icon:"🖼️",category:"Layout"}];function Ce({dashboard:r,dataSources:a=[],onChange:i,onWidgetAdd:o,onRefresh:n,className:f="",tutorial:p}){const[s,x]=m.useState(r||{...Se,id:crypto.randomUUID()}),[c,h]=m.useState(null),[d,v]=m.useState(!0),[H,k]=m.useState(null),[T,w]=m.useState(!0),S=m.useRef(null),R=m.useCallback(y=>{x(t=>{const b=y(t);return i==null||i(b),b})},[i]),E=m.useCallback((y,t)=>{var g;const b={id:crypto.randomUUID(),type:y,title:((g=$.find(D=>D.type===y))==null?void 0:g.label)||y,position:{x:(t==null?void 0:t.x)??0,y:(t==null?void 0:t.y)??ke(s.widgets),width:(t==null?void 0:t.width)??De(y),height:(t==null?void 0:t.height)??He(y)},config:Te(y)};R(D=>({...D,widgets:[...D.widgets,b]})),h(b),o==null||o(y)},[s.widgets,R,o]),N=m.useCallback((y,t)=>{R(b=>({...b,widgets:b.widgets.map(g=>g.id===y?{...g,...t}:g)})),(c==null?void 0:c.id)===y&&h(b=>b?{...b,...t}:null)},[R,c]),M=m.useCallback(y=>{R(t=>({...t,widgets:t.widgets.filter(b=>b.id!==y)})),h(null)},[R]),P=m.useCallback(y=>{if(y.preventDefault(),!H||!S.current)return;const t=S.current.getBoundingClientRect(),b=t.width/(s.layout.columns||12),g=Math.floor((y.clientX-t.left)/b),D=Math.floor((y.clientY-t.top)/(s.layout.rowHeight||50));E(H,{x:g,y:D}),k(null)},[H,s.layout,E]),L=m.useCallback(()=>{n==null||n()},[n]);return e.jsxs("div",{className:`nice-dashboard-studio ${f}`,children:[e.jsxs("div",{className:"nice-dashboard-studio__toolbar",children:[e.jsx("input",{type:"text",value:s.name,onChange:y=>R(t=>({...t,name:y.target.value})),className:"nice-dashboard-studio__name-input",disabled:!d}),e.jsxs("div",{className:"nice-dashboard-studio__actions",children:[e.jsx("button",{className:`nice-dashboard-studio__action ${d?"active":""}`,onClick:()=>v(!d),children:d?"✏️ Editing":"👁 Viewing"}),e.jsxs("button",{onClick:()=>w(!T),children:["🔍 Filters ",T?"▲":"▼"]}),e.jsx("button",{onClick:L,children:"🔄 Refresh"}),e.jsx("button",{children:"📤 Share"}),e.jsx("button",{children:"💾 Save"}),e.jsx(V,{steps:O(p,Ne)})]})]}),T&&s.filters.length>0&&e.jsx("div",{className:"nice-dashboard-studio__filters-bar",children:s.filters.map(y=>e.jsx(Me,{filter:y},y.id))}),e.jsxs("div",{className:"nice-dashboard-studio__main",children:[d&&e.jsxs("div",{className:"nice-dashboard-studio__palette",children:[e.jsx("h4",{children:"Widgets"}),["Visualization","Controls","Layout"].map(y=>e.jsxs("div",{className:"nice-dashboard-studio__category",children:[e.jsx("h5",{children:y}),$.filter(t=>t.category===y).map(t=>e.jsxs("div",{className:"nice-dashboard-studio__palette-item",draggable:!0,onDragStart:()=>k(t.type),onDragEnd:()=>k(null),children:[e.jsx("span",{className:"nice-dashboard-studio__palette-icon",children:t.icon}),e.jsx("span",{children:t.label})]},t.type))]},y)),e.jsx("h4",{children:"Data Sources"}),a.map(y=>e.jsx("div",{className:"nice-dashboard-studio__datasource",children:e.jsxs("span",{children:["🗄️ ",y.name]})},y.id))]}),e.jsxs("div",{ref:S,className:`nice-dashboard-studio__grid ${d?"nice-dashboard-studio__grid--editing":""}`,style:{"--columns":s.layout.columns||12,"--row-height":`${s.layout.rowHeight||50}px`,"--gap":`${s.layout.gap||8}px`},onDragOver:y=>y.preventDefault(),onDrop:P,onClick:()=>h(null),children:[s.widgets.map(y=>e.jsx(Re,{widget:y,isSelected:(c==null?void 0:c.id)===y.id,isEditing:d,onSelect:()=>h(y),onUpdate:t=>N(y.id,t),onDelete:()=>M(y.id)},y.id)),s.widgets.length===0&&d&&e.jsx("div",{className:"nice-dashboard-studio__empty",children:"Drag widgets from the palette to build your dashboard"})]}),c&&d&&e.jsx(Pe,{widget:c,dataSources:a,onChange:y=>N(c.id,y),onClose:()=>h(null)})]})]})}function ke(r){return r.length===0?0:Math.max(...r.map(a=>a.position.y+a.position.height))}function De(r){switch(r){case"card":return 3;case"gauge":return 3;case"filter":case"slicer":return 3;case"text":return 4;case"chart":case"table":return 6;case"map":return 8;default:return 4}}function He(r){switch(r){case"card":return 2;case"gauge":return 3;case"filter":case"slicer":return 1;case"text":return 2;case"chart":case"table":return 5;case"map":return 8;default:return 4}}function Te(r){switch(r){case"chart":return{chartType:"bar",series:[],axes:[],legend:{show:!0,position:"bottom"}};case"table":return{columns:[],pageSize:10};case"card":return{value:"",label:"",format:"number",icon:"📊"};case"gauge":return{value:"0",min:0,max:100,target:75,format:"percent"};case"map":return{type:"choropleth",geoField:"",valueField:""};case"filter":return{field:"",type:"dropdown"};case"slicer":return{field:"",multiSelect:!0};case"text":return{content:"Text content",fontSize:14};case"image":return{src:"",fit:"contain"};default:return{}}}function Re({widget:r,isSelected:a,isEditing:i,onSelect:o,onUpdate:n,onDelete:f}){const p=x=>{if(!i||x.button!==0)return;x.stopPropagation(),o();const c=x.clientX,h=x.clientY,d={...r.position},v=k=>{const T=Math.round((k.clientX-c)/50),w=Math.round((k.clientY-h)/50);n({position:{...d,x:Math.max(0,d.x+T),y:Math.max(0,d.y+w)}})},H=()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",H)};window.addEventListener("mousemove",v),window.addEventListener("mouseup",H)},s=$.find(x=>x.type===r.type);return e.jsxs("div",{className:`nice-dashboard-studio__widget nice-dashboard-studio__widget--${r.type} ${a?"nice-dashboard-studio__widget--selected":""}`,style:{gridColumn:`${r.position.x+1} / span ${r.position.width}`,gridRow:`${r.position.y+1} / span ${r.position.height}`},onMouseDown:p,children:[e.jsxs("div",{className:"nice-dashboard-studio__widget-header",children:[e.jsx("span",{className:"nice-dashboard-studio__widget-icon",children:s==null?void 0:s.icon}),e.jsx("span",{className:"nice-dashboard-studio__widget-title",children:r.title}),i&&e.jsx("button",{className:"nice-dashboard-studio__widget-delete",onClick:x=>{x.stopPropagation(),f()},children:"×"})]}),e.jsx("div",{className:"nice-dashboard-studio__widget-content",children:e.jsx(Ee,{widget:r})})]})}function Ee({widget:r}){switch(r.type){case"card":return e.jsxs("div",{className:"nice-dashboard-studio__card",children:[e.jsx("div",{className:"nice-dashboard-studio__card-value",children:String(r.config.value||"0")}),e.jsx("div",{className:"nice-dashboard-studio__card-label",children:String(r.config.label||"Label")})]});case"gauge":{const a=Number(r.config.value)||0,i=Number(r.config.max)||100,o=a/i*100;return e.jsx("div",{className:"nice-dashboard-studio__gauge",children:e.jsxs("svg",{viewBox:"0 0 100 60",children:[e.jsx("path",{d:"M 10 55 A 40 40 0 0 1 90 55",fill:"none",stroke:"var(--nice-border, #e0e0e0)",strokeWidth:"8"}),e.jsx("path",{d:"M 10 55 A 40 40 0 0 1 90 55",fill:"none",stroke:"var(--nice-primary, #0066cc)",strokeWidth:"8",strokeDasharray:`${o*1.26} 126`}),e.jsxs("text",{x:"50",y:"50",textAnchor:"middle",fontSize:"16",fontWeight:"bold",children:[a,"%"]})]})})}case"chart":return e.jsxs("div",{className:"nice-dashboard-studio__chart-placeholder",children:[e.jsx("span",{children:"📊"}),e.jsxs("span",{children:[String(r.config.chartType||"bar")," chart"]})]});case"table":return e.jsxs("div",{className:"nice-dashboard-studio__table-placeholder",children:[e.jsx("span",{children:"📋"}),e.jsx("span",{children:"Data table"})]});case"map":return e.jsxs("div",{className:"nice-dashboard-studio__map-placeholder",children:[e.jsx("span",{children:"🗺️"}),e.jsx("span",{children:"Map visualization"})]});case"text":return e.jsx("div",{className:"nice-dashboard-studio__text",style:{fontSize:Number(r.config.fontSize)||14},children:String(r.config.content||"")});default:return e.jsx("div",{className:"nice-dashboard-studio__widget-placeholder",children:r.type})}}function Me({filter:r}){const[a,i]=m.useState(r.defaultValue);switch(r.type){case"dropdown":return e.jsxs("div",{className:"nice-dashboard-studio__filter",children:[e.jsx("label",{children:r.label}),e.jsx("select",{value:String(a||""),onChange:o=>i(o.target.value),children:e.jsx("option",{value:"",children:"All"})})]});case"daterange":return e.jsxs("div",{className:"nice-dashboard-studio__filter",children:[e.jsx("label",{children:r.label}),e.jsx("input",{type:"date"}),e.jsx("span",{children:"to"}),e.jsx("input",{type:"date"})]});case"slider":return e.jsxs("div",{className:"nice-dashboard-studio__filter",children:[e.jsx("label",{children:r.label}),e.jsx("input",{type:"range"})]});default:return e.jsxs("div",{className:"nice-dashboard-studio__filter",children:[e.jsx("label",{children:r.label}),e.jsx("input",{type:"text",value:String(a||""),onChange:o=>i(o.target.value)})]})}}function Pe({widget:r,dataSources:a,onChange:i,onClose:o}){return e.jsxs("div",{className:"nice-dashboard-studio__properties",children:[e.jsxs("div",{className:"nice-dashboard-studio__properties-header",children:[e.jsx("h4",{children:"Widget Properties"}),e.jsx("button",{onClick:o,children:"×"})]}),e.jsxs("div",{className:"nice-dashboard-studio__properties-content",children:[e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Title"}),e.jsx("input",{type:"text",value:r.title||"",onChange:n=>i({title:n.target.value})})]}),e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Data Source"}),e.jsxs("select",{value:r.dataSource||"",onChange:n=>i({dataSource:n.target.value}),children:[e.jsx("option",{value:"",children:"Select..."}),a.map(n=>e.jsx("option",{value:n.id,children:n.name},n.id))]})]}),e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Size"}),e.jsxs("div",{className:"nice-dashboard-studio__size-inputs",children:[e.jsx("input",{type:"number",value:r.position.width,onChange:n=>i({position:{...r.position,width:parseInt(n.target.value,10)||1}}),min:1,max:12}),e.jsx("span",{children:"×"}),e.jsx("input",{type:"number",value:r.position.height,onChange:n=>i({position:{...r.position,height:parseInt(n.target.value,10)||1}}),min:1,max:20})]})]}),r.type==="chart"&&e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Chart Type"}),e.jsxs("select",{value:String(r.config.chartType||"bar"),onChange:n=>i({config:{...r.config,chartType:n.target.value}}),children:[e.jsx("option",{value:"bar",children:"Bar"}),e.jsx("option",{value:"line",children:"Line"}),e.jsx("option",{value:"pie",children:"Pie"}),e.jsx("option",{value:"area",children:"Area"}),e.jsx("option",{value:"scatter",children:"Scatter"}),e.jsx("option",{value:"donut",children:"Donut"})]})]}),r.type==="card"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Value Field"}),e.jsx("input",{type:"text",value:String(r.config.value||""),onChange:n=>i({config:{...r.config,value:n.target.value}}),placeholder:"e.g., SUM(Sales)"})]}),e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Label"}),e.jsx("input",{type:"text",value:String(r.config.label||""),onChange:n=>i({config:{...r.config,label:n.target.value}})})]})]}),r.type==="text"&&e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Content"}),e.jsx("textarea",{value:String(r.config.content||""),onChange:n=>i({config:{...r.config,content:n.target.value}}),rows:4})]}),e.jsxs("div",{className:"nice-dashboard-studio__field",children:[e.jsx("label",{children:"Refresh Interval (seconds)"}),e.jsx("input",{type:"number",value:r.refreshInterval||0,onChange:n=>i({refreshInterval:parseInt(n.target.value,10)||0}),min:0,placeholder:"0 = manual"})]})]})]})}const Le=[{target:".nice-etl-builder",titleKey:"tutorial.etlBuilder.intro.title",title:"ETL builder",contentKey:"tutorial.etlBuilder.intro.content",content:"Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",placement:"auto"}],Ie={id:"",name:"New Pipeline",sources:[],transformations:[],destinations:[],version:1},A=[{type:"filter",label:"Filter",icon:"🔍"},{type:"map",label:"Map",icon:"🔄"},{type:"aggregate",label:"Aggregate",icon:"∑"},{type:"join",label:"Join",icon:"🔗"},{type:"union",label:"Union",icon:"∪"},{type:"sort",label:"Sort",icon:"↕️"},{type:"deduplicate",label:"Deduplicate",icon:"🔲"},{type:"pivot",label:"Pivot",icon:"⤢"},{type:"unpivot",label:"Unpivot",icon:"⤡"},{type:"split",label:"Split",icon:"✂️"},{type:"merge",label:"Merge",icon:"🔀"},{type:"lookup",label:"Lookup",icon:"📖"},{type:"derive",label:"Derive Column",icon:"➕"},{type:"validate",label:"Validate",icon:"✓"},{type:"cleanse",label:"Cleanse",icon:"🧹"},{type:"custom",label:"Custom",icon:"ƒ"}];function ze({pipeline:r,dataSources:a=[],onChange:i,onRun:o,onSchedule:n,className:f="",tutorial:p}){const[s,x]=m.useState(r||{...Ie,id:crypto.randomUUID()}),[c,h]=m.useState(null),[d,v]=m.useState("design"),[H,k]=m.useState(!1),[T,w]=m.useState([]),[S,R]=m.useState(null),E=m.useRef(null),N=m.useCallback(u=>{x(j=>{const _=u(j);return i==null||i(_),_})},[i]),M=m.useCallback(u=>{var _;const j={id:crypto.randomUUID(),type:u.type,name:u.name,config:u.config,schema:(_=u.schema)==null?void 0:_.tables[0]};N(I=>({...I,sources:[...I.sources,j]}))},[N]),P=m.useCallback((u,j)=>{var I;const _={id:crypto.randomUUID(),type:u,name:((I=A.find(F=>F.type===u))==null?void 0:I.label)||u,input:[],output:crypto.randomUUID(),config:Fe(u)};N(F=>({...F,transformations:[...F.transformations,_]})),h({type:"transformation",id:_.id})},[N]),L=m.useCallback(()=>{const u={id:crypto.randomUUID(),type:"database",name:"New Destination",config:{},writeMode:"append"};N(j=>({...j,destinations:[...j.destinations,u]})),h({type:"destination",id:u.id})},[N]),y=m.useCallback((u,j)=>{N(_=>{switch(u){case"source":return{..._,sources:_.sources.filter(I=>I.id!==j)};case"transformation":return{..._,transformations:_.transformations.filter(I=>I.id!==j)};case"destination":return{..._,destinations:_.destinations.filter(I=>I.id!==j)};default:return _}}),h(null)},[N]),t=m.useCallback(async()=>{if(o){k(!0);try{const u=await o(s);w(j=>[u,...j].slice(0,50))}finally{k(!1)}}},[s,o]),b=m.useCallback(u=>{N(j=>({...j,schedule:u})),n==null||n(s,u)},[s,N,n]),g=m.useCallback(u=>{if(u.preventDefault(),!!S){if(S.startsWith("transform:")){const j=S.replace("transform:","");P(j)}R(null)}},[S,P]),D=()=>{if(!c)return null;switch(c.type){case"source":return s.sources.find(u=>u.id===c.id);case"transformation":return s.transformations.find(u=>u.id===c.id);case"destination":return s.destinations.find(u=>u.id===c.id);default:return null}};return e.jsxs("div",{className:`nice-etl-builder ${f}`,children:[e.jsxs("div",{className:"nice-etl-builder__toolbar",children:[e.jsx("input",{type:"text",value:s.name,onChange:u=>N(j=>({...j,name:u.target.value})),className:"nice-etl-builder__name-input"}),e.jsx("div",{className:"nice-etl-builder__tabs",children:["design","code","schedule","history"].map(u=>e.jsx("button",{className:`nice-etl-builder__tab ${d===u?"nice-etl-builder__tab--active":""}`,onClick:()=>v(u),children:u.charAt(0).toUpperCase()+u.slice(1)},u))}),e.jsxs("div",{className:"nice-etl-builder__actions",children:[e.jsx("button",{onClick:t,disabled:H,className:"nice-etl-builder__run-btn",children:H?"⏳ Running...":"▶ Run"}),e.jsx("button",{className:"nice-etl-builder__save-btn",children:"💾 Save"}),e.jsx(V,{steps:O(p,Le)})]})]}),e.jsxs("div",{className:"nice-etl-builder__main",children:[d==="design"&&e.jsxs("div",{className:"nice-etl-builder__palette",children:[e.jsx("h4",{children:"Sources"}),a.map(u=>e.jsxs("div",{className:"nice-etl-builder__palette-item",onClick:()=>M(u),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:"🗄️"}),e.jsx("span",{children:u.name})]},u.id)),e.jsx("button",{onClick:()=>M({id:"",name:"New Source",type:"database",config:{}}),children:"+ Add Source"}),e.jsx("h4",{children:"Transformations"}),A.map(u=>e.jsxs("div",{className:"nice-etl-builder__palette-item",draggable:!0,onDragStart:()=>R(`transform:${u.type}`),onDragEnd:()=>R(null),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:u.icon}),e.jsx("span",{children:u.label})]},u.type)),e.jsx("h4",{children:"Destinations"}),e.jsx("button",{onClick:L,children:"+ Add Destination"})]}),d==="design"&&e.jsx("div",{ref:E,className:"nice-etl-builder__canvas",onDragOver:u=>u.preventDefault(),onDrop:g,onClick:()=>h(null),children:e.jsxs("div",{className:"nice-etl-builder__flow",children:[e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:"Sources"}),s.sources.map(u=>e.jsx(U,{node:u,nodeType:"source",icon:"🗄️",isSelected:(c==null?void 0:c.id)===u.id,onSelect:()=>h({type:"source",id:u.id}),onDelete:()=>y("source",u.id)},u.id))]}),e.jsx("div",{className:"nice-etl-builder__arrow",children:"→"}),e.jsxs("div",{className:"nice-etl-builder__column nice-etl-builder__column--transforms",children:[e.jsx("h5",{children:"Transformations"}),s.transformations.map(u=>{const j=A.find(_=>_.type===u.type);return e.jsx(U,{node:u,nodeType:"transformation",icon:(j==null?void 0:j.icon)||"🔄",isSelected:(c==null?void 0:c.id)===u.id,onSelect:()=>h({type:"transformation",id:u.id}),onDelete:()=>y("transformation",u.id)},u.id)}),s.transformations.length===0&&e.jsx("div",{className:"nice-etl-builder__empty-column",children:"Drag transformations here"})]}),e.jsx("div",{className:"nice-etl-builder__arrow",children:"→"}),e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:"Destinations"}),s.destinations.map(u=>e.jsx(U,{node:u,nodeType:"destination",icon:"📥",isSelected:(c==null?void 0:c.id)===u.id,onSelect:()=>h({type:"destination",id:u.id}),onDelete:()=>y("destination",u.id)},u.id))]})]})}),d==="code"&&e.jsx("div",{className:"nice-etl-builder__code-view",children:e.jsx("pre",{children:JSON.stringify(s,null,2)})}),d==="schedule"&&e.jsx(Ue,{schedule:s.schedule,monitoring:s.monitoring,onChange:b}),d==="history"&&e.jsx($e,{runs:T}),c&&d==="design"&&e.jsx(Ae,{nodeType:c.type,node:D()??null,dataSources:a,onChange:u=>{N(j=>{switch(c.type){case"source":return{...j,sources:j.sources.map(_=>_.id===c.id?{..._,...u}:_)};case"transformation":return{...j,transformations:j.transformations.map(_=>_.id===c.id?{..._,...u}:_)};case"destination":return{...j,destinations:j.destinations.map(_=>_.id===c.id?{..._,...u}:_)};default:return j}})},onClose:()=>h(null)})]})]})}function Fe(r){switch(r){case"filter":return{condition:""};case"map":return{mappings:[]};case"aggregate":return{groupBy:[],aggregations:[]};case"join":return{joinType:"inner",leftKey:"",rightKey:""};case"union":return{inputs:[]};case"sort":return{columns:[],directions:[]};case"deduplicate":return{columns:[],keepFirst:!0};case"pivot":return{pivotColumn:"",valueColumn:"",aggregation:"sum"};case"unpivot":return{columns:[],nameColumn:"name",valueColumn:"value"};case"derive":return{name:"",expression:""};case"validate":return{rules:[]};case"cleanse":return{operations:[]};case"custom":return{code:`// Custom transformation
|
|
28
|
-
return data;`};default:return{}}}function
|
|
27
|
+
`,document.head.appendChild(a)}s.createContext(null);s.createContext(null);s.createContext(null);const I={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},z={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},U={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},O=a=>({color:a,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),le={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},ye={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function i(a,r,c,d,y){return{name:a,darkMode:"light",colors:{...r,surface:r.surface??c.primary,surfaceHover:r.surfaceHover??c.secondary},backgrounds:{...c,elevated:c.elevated??c.primary,inset:c.inset??c.tertiary,canvas:c.canvas??c.primary},text:{...d,inverse:d.inverse??"#ffffff"},borders:O(y),shadows:le,spacing:I,typography:z,transitions:U}}function m(a,r,c,d,y){return{name:a,darkMode:"dark",colors:{...r,surface:r.surface??c.secondary,surfaceHover:r.surfaceHover??c.tertiary},backgrounds:{...c,elevated:c.elevated??c.secondary,inset:c.inset??c.primary,canvas:c.canvas??c.primary},text:{...d,inverse:d.inverse??"#0f172a"},borders:O(y),shadows:ye,spacing:I,typography:z,transitions:U}}i("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1");i("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8");i("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");i("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db");i("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8");i("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1");i("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db");i("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4");i("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af");i("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7");i("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d");i("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");i("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");i("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc");i("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9");i("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264");i("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4");i("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74");i("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9");i("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc");i("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af");i("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74");m("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b");m("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46");m("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266");m("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626");m("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252");m("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563"},"#374151");m("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87");m("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985");m("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040");m("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857");i("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");i("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc");i("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047");i("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74");i("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");i("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe");i("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5");i("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac");i("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");i("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");i("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4");i("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");i("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0");i("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa");i("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe");i("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a");i("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0");i("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3");i("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1");i("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb");i("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");i("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");i("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd");i("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1");i("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");i("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d");i("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9");m("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a");i("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5");m("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75"},"#073642");m("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32");m("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452");m("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866");i("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8");m("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300");i("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8");i("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4");m("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72"},"#1c3a44");m("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333");m("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66");i("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");m("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28"},"#5c3400");i("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af");i("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe");i("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d");i("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe");i("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8");i("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d");i("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0");i("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0");i("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb");i("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe");i("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5");i("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d");i("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");i("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896");m("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff");i("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0");i("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c");i("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5");m("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e");m("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58");i("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8");i("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");s.createContext(null);const me=[{target:".nice-etl-builder",titleKey:"tutorial.etlBuilder.intro.title",title:"ETL builder",contentKey:"tutorial.etlBuilder.intro.content",content:"Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",placement:"auto"}],pe={id:"",name:"New Pipeline",sources:[],transformations:[],destinations:[],version:1},k=[{type:"filter",label:"Filter",icon:"🔍"},{type:"map",label:"Map",icon:"🔄"},{type:"aggregate",label:"Aggregate",icon:"∑"},{type:"join",label:"Join",icon:"🔗"},{type:"union",label:"Union",icon:"∪"},{type:"sort",label:"Sort",icon:"↕️"},{type:"deduplicate",label:"Deduplicate",icon:"🔲"},{type:"pivot",label:"Pivot",icon:"⤢"},{type:"unpivot",label:"Unpivot",icon:"⤡"},{type:"split",label:"Split",icon:"✂️"},{type:"merge",label:"Merge",icon:"🔀"},{type:"lookup",label:"Lookup",icon:"📖"},{type:"derive",label:"Derive Column",icon:"➕"},{type:"validate",label:"Validate",icon:"✓"},{type:"cleanse",label:"Cleanse",icon:"🧹"},{type:"custom",label:"Custom",icon:"ƒ"}];function ue({pipeline:a,dataSources:r=[],onChange:c,onRun:d,onSchedule:y,className:u="",tutorial:t}){const[p,w]=s.useState(a||{...pe,id:crypto.randomUUID()}),[o,b]=s.useState(null),[g,j]=s.useState("design"),[_,H]=s.useState(!1),[W,B]=s.useState([]),[S,N]=s.useState(null),$=s.useRef(null),v=s.useCallback(n=>{w(f=>{const l=n(f);return c==null||c(l),l})},[c]),E=s.useCallback(n=>{var l;const f={id:crypto.randomUUID(),type:n.type,name:n.name,config:n.config,schema:(l=n.schema)==null?void 0:l.tables[0]};v(h=>({...h,sources:[...h.sources,f]}))},[v]),A=s.useCallback((n,f)=>{var h;const l={id:crypto.randomUUID(),type:n,name:((h=k.find(C=>C.type===n))==null?void 0:h.label)||n,input:[],output:crypto.randomUUID(),config:be(n)};v(C=>({...C,transformations:[...C.transformations,l]})),b({type:"transformation",id:l.id})},[v]),V=s.useCallback(()=>{const n={id:crypto.randomUUID(),type:"database",name:"New Destination",config:{},writeMode:"append"};v(f=>({...f,destinations:[...f.destinations,n]})),b({type:"destination",id:n.id})},[v]),T=s.useCallback((n,f)=>{v(l=>{switch(n){case"source":return{...l,sources:l.sources.filter(h=>h.id!==f)};case"transformation":return{...l,transformations:l.transformations.filter(h=>h.id!==f)};case"destination":return{...l,destinations:l.destinations.filter(h=>h.id!==f)};default:return l}}),b(null)},[v]),K=s.useCallback(async()=>{if(d){H(!0);try{const n=await d(p);B(f=>[n,...f].slice(0,50))}finally{H(!1)}}},[p,d]),J=s.useCallback(n=>{v(f=>({...f,schedule:n})),y==null||y(p,n)},[p,v,y]),G=s.useCallback(n=>{if(n.preventDefault(),!!S){if(S.startsWith("transform:")){const f=S.replace("transform:","");A(f)}N(null)}},[S,A]),q=()=>{if(!o)return null;switch(o.type){case"source":return p.sources.find(n=>n.id===o.id);case"transformation":return p.transformations.find(n=>n.id===o.id);case"destination":return p.destinations.find(n=>n.id===o.id);default:return null}};return e.jsxs("div",{className:`nice-etl-builder ${u}`,children:[e.jsxs("div",{className:"nice-etl-builder__toolbar",children:[e.jsx("input",{type:"text",value:p.name,onChange:n=>v(f=>({...f,name:n.target.value})),className:"nice-etl-builder__name-input"}),e.jsx("div",{className:"nice-etl-builder__tabs",children:["design","code","schedule","history"].map(n=>e.jsx("button",{className:`nice-etl-builder__tab ${g===n?"nice-etl-builder__tab--active":""}`,onClick:()=>j(n),children:n.charAt(0).toUpperCase()+n.slice(1)},n))}),e.jsxs("div",{className:"nice-etl-builder__actions",children:[e.jsx("button",{onClick:K,disabled:_,className:"nice-etl-builder__run-btn",children:_?"⏳ Running...":"▶ Run"}),e.jsx("button",{className:"nice-etl-builder__save-btn",children:"💾 Save"}),e.jsx(fe,{steps:de(t,me)})]})]}),e.jsxs("div",{className:"nice-etl-builder__main",children:[g==="design"&&e.jsxs("div",{className:"nice-etl-builder__palette",children:[e.jsx("h4",{children:"Sources"}),r.map(n=>e.jsxs("div",{className:"nice-etl-builder__palette-item",onClick:()=>E(n),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:"🗄️"}),e.jsx("span",{children:n.name})]},n.id)),e.jsx("button",{onClick:()=>E({id:"",name:"New Source",type:"database",config:{}}),children:"+ Add Source"}),e.jsx("h4",{children:"Transformations"}),k.map(n=>e.jsxs("div",{className:"nice-etl-builder__palette-item",draggable:!0,onDragStart:()=>N(`transform:${n.type}`),onDragEnd:()=>N(null),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:n.icon}),e.jsx("span",{children:n.label})]},n.type)),e.jsx("h4",{children:"Destinations"}),e.jsx("button",{onClick:V,children:"+ Add Destination"})]}),g==="design"&&e.jsx("div",{ref:$,className:"nice-etl-builder__canvas",onDragOver:n=>n.preventDefault(),onDrop:G,onClick:()=>b(null),children:e.jsxs("div",{className:"nice-etl-builder__flow",children:[e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:"Sources"}),p.sources.map(n=>e.jsx(D,{node:n,nodeType:"source",icon:"🗄️",isSelected:(o==null?void 0:o.id)===n.id,onSelect:()=>b({type:"source",id:n.id}),onDelete:()=>T("source",n.id)},n.id))]}),e.jsx("div",{className:"nice-etl-builder__arrow",children:"→"}),e.jsxs("div",{className:"nice-etl-builder__column nice-etl-builder__column--transforms",children:[e.jsx("h5",{children:"Transformations"}),p.transformations.map(n=>{const f=k.find(l=>l.type===n.type);return e.jsx(D,{node:n,nodeType:"transformation",icon:(f==null?void 0:f.icon)||"🔄",isSelected:(o==null?void 0:o.id)===n.id,onSelect:()=>b({type:"transformation",id:n.id}),onDelete:()=>T("transformation",n.id)},n.id)}),p.transformations.length===0&&e.jsx("div",{className:"nice-etl-builder__empty-column",children:"Drag transformations here"})]}),e.jsx("div",{className:"nice-etl-builder__arrow",children:"→"}),e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:"Destinations"}),p.destinations.map(n=>e.jsx(D,{node:n,nodeType:"destination",icon:"📥",isSelected:(o==null?void 0:o.id)===n.id,onSelect:()=>b({type:"destination",id:n.id}),onDelete:()=>T("destination",n.id)},n.id))]})]})}),g==="code"&&e.jsx("div",{className:"nice-etl-builder__code-view",children:e.jsx("pre",{children:JSON.stringify(p,null,2)})}),g==="schedule"&&e.jsx(he,{schedule:p.schedule,monitoring:p.monitoring,onChange:J}),g==="history"&&e.jsx(ge,{runs:W}),o&&g==="design"&&e.jsx(ve,{nodeType:o.type,node:q()??null,dataSources:r,onChange:n=>{v(f=>{switch(o.type){case"source":return{...f,sources:f.sources.map(l=>l.id===o.id?{...l,...n}:l)};case"transformation":return{...f,transformations:f.transformations.map(l=>l.id===o.id?{...l,...n}:l)};case"destination":return{...f,destinations:f.destinations.map(l=>l.id===o.id?{...l,...n}:l)};default:return f}})},onClose:()=>b(null)})]})]})}function be(a){switch(a){case"filter":return{condition:""};case"map":return{mappings:[]};case"aggregate":return{groupBy:[],aggregations:[]};case"join":return{joinType:"inner",leftKey:"",rightKey:""};case"union":return{inputs:[]};case"sort":return{columns:[],directions:[]};case"deduplicate":return{columns:[],keepFirst:!0};case"pivot":return{pivotColumn:"",valueColumn:"",aggregation:"sum"};case"unpivot":return{columns:[],nameColumn:"name",valueColumn:"value"};case"derive":return{name:"",expression:""};case"validate":return{rules:[]};case"cleanse":return{operations:[]};case"custom":return{code:`// Custom transformation
|
|
28
|
+
return data;`};default:return{}}}function D({node:a,nodeType:r,icon:c,isSelected:d,onSelect:y,onDelete:u}){return e.jsxs("div",{className:`nice-etl-builder__node nice-etl-builder__node--${r} ${d?"nice-etl-builder__node--selected":""}`,onClick:t=>{t.stopPropagation(),y()},children:[e.jsx("span",{className:"nice-etl-builder__node-icon",children:c}),e.jsx("span",{className:"nice-etl-builder__node-name",children:a.name}),e.jsx("button",{className:"nice-etl-builder__node-delete",onClick:t=>{t.stopPropagation(),u()},children:"×"})]})}function ve({nodeType:a,node:r,dataSources:c,onChange:d,onClose:y}){var u;return r?e.jsxs("div",{className:"nice-etl-builder__properties",children:[e.jsxs("div",{className:"nice-etl-builder__properties-header",children:[e.jsxs("h4",{children:[a.charAt(0).toUpperCase()+a.slice(1)," Properties"]}),e.jsx("button",{onClick:y,children:"×"})]}),e.jsxs("div",{className:"nice-etl-builder__properties-content",children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Name"}),e.jsx("input",{type:"text",value:r.name,onChange:t=>d({name:t.target.value})})]}),a==="source"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Type"}),e.jsxs("select",{value:r.type,onChange:t=>d({type:t.target.value}),children:[e.jsx("option",{value:"database",children:"Database"}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"file",children:"File"}),e.jsx("option",{value:"stream",children:"Stream"})]})]}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:((u=r.incremental)==null?void 0:u.enabled)||!1,onChange:t=>{var p;return d({incremental:{...r.incremental,enabled:t.target.checked,column:((p=r.incremental)==null?void 0:p.column)||""}})}}),"Incremental Load"]})})]}),a==="transformation"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Type"}),e.jsx("span",{children:r.type})]}),r.type==="filter"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Condition"}),e.jsx("textarea",{value:String(r.config.condition||""),onChange:t=>d({config:{...r.config,condition:t.target.value}}),placeholder:"e.g., age > 18 AND status = 'active'",rows:3})]}),r.type==="derive"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Column Name"}),e.jsx("input",{type:"text",value:String(r.config.name||""),onChange:t=>d({config:{...r.config,name:t.target.value}})})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Expression"}),e.jsx("input",{type:"text",value:String(r.config.expression||""),onChange:t=>d({config:{...r.config,expression:t.target.value}}),placeholder:"e.g., price * quantity"})]})]}),r.type==="custom"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Code"}),e.jsx("textarea",{value:String(r.config.code||""),onChange:t=>d({config:{...r.config,code:t.target.value}}),rows:10,className:"nice-etl-builder__code-input"})]})]}),a==="destination"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Type"}),e.jsxs("select",{value:r.type,onChange:t=>d({type:t.target.value}),children:[e.jsx("option",{value:"database",children:"Database"}),e.jsx("option",{value:"file",children:"File"}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"warehouse",children:"Data Warehouse"})]})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Write Mode"}),e.jsxs("select",{value:r.writeMode,onChange:t=>d({writeMode:t.target.value}),children:[e.jsx("option",{value:"append",children:"Append"}),e.jsx("option",{value:"overwrite",children:"Overwrite"}),e.jsx("option",{value:"upsert",children:"Upsert"}),e.jsx("option",{value:"merge",children:"Merge"})]})]})]})]})]}):e.jsx(e.Fragment,{})}function he({schedule:a,monitoring:r,onChange:c}){const[d,y]=s.useState(a||{enabled:!1});return e.jsxs("div",{className:"nice-etl-builder__schedule-editor",children:[e.jsx("h4",{children:"Schedule Configuration"}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:d.enabled,onChange:u=>{const t={...d,enabled:u.target.checked};y(t),c(t)}}),"Enable scheduled execution"]})}),d.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Cron Expression"}),e.jsx("input",{type:"text",value:d.cron||"",onChange:u=>{const t={...d,cron:u.target.value};y(t)},placeholder:"0 0 * * * (every hour)"}),e.jsx("small",{children:"Format: minute hour day month weekday"})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Timezone"}),e.jsxs("select",{value:d.timezone||"UTC",onChange:u=>{const t={...d,timezone:u.target.value};y(t)},children:[e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:"Eastern Time"}),e.jsx("option",{value:"America/Chicago",children:"Central Time"}),e.jsx("option",{value:"America/Los_Angeles",children:"Pacific Time"}),e.jsx("option",{value:"Europe/London",children:"London"}),e.jsx("option",{value:"Europe/Warsaw",children:"Warsaw"})]})]}),e.jsx("button",{onClick:()=>c(d),children:"Save Schedule"})]}),e.jsx("h4",{children:"Monitoring"}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:(r==null?void 0:r.alertOnFailure)||!1,disabled:!0}),"Alert on failure"]})}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Log Level"}),e.jsxs("select",{value:(r==null?void 0:r.logLevel)||"info",disabled:!0,children:[e.jsx("option",{value:"error",children:"Error"}),e.jsx("option",{value:"warn",children:"Warning"}),e.jsx("option",{value:"info",children:"Info"}),e.jsx("option",{value:"debug",children:"Debug"})]})]})]})}function ge({runs:a}){return e.jsxs("div",{className:"nice-etl-builder__history-view",children:[e.jsx("h4",{children:"Run History"}),a.length===0?e.jsx("div",{className:"nice-etl-builder__no-history",children:"No runs yet"}):e.jsxs("table",{className:"nice-etl-builder__history-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Start Time"}),e.jsx("th",{children:"Duration"}),e.jsx("th",{children:"Rows"}),e.jsx("th",{children:"Errors"})]})}),e.jsx("tbody",{children:a.map(r=>e.jsxs("tr",{className:`nice-etl-builder__run nice-etl-builder__run--${r.status}`,children:[e.jsx("td",{children:e.jsxs("span",{className:`nice-etl-builder__status nice-etl-builder__status--${r.status}`,children:[r.status==="success"?"✓":r.status==="failed"?"✗":"⏳",r.status]})}),e.jsx("td",{children:r.startTime.toLocaleString()}),e.jsx("td",{children:r.endTime?`${Math.round((r.endTime.getTime()-r.startTime.getTime())/1e3)}s`:"-"}),e.jsxs("td",{children:[r.rowsProcessed.toLocaleString()," / ",r.rowsWritten.toLocaleString()]}),e.jsx("td",{children:r.errors.length})]},r.id))})]})]})}exports.NiceETLBuilder=ue;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,5 @@
|
|
|
2
2
|
* @package @nice2dev/ui-bi
|
|
3
3
|
* Nice2Dev Business Intelligence
|
|
4
4
|
*/
|
|
5
|
-
export { NiceReportBuilder } from './NiceReportBuilder';
|
|
6
|
-
export { NiceDashboardStudio } from './NiceDashboardStudio';
|
|
7
5
|
export { NiceETLBuilder } from './NiceETLBuilder';
|
|
8
|
-
export {
|
|
9
|
-
export type { DataSource, DataSourceConfig, DataSchema, TableSchema, ColumnSchema, Relationship, Report, ReportQuery, QueryJoin, QueryColumn, QueryCondition, ReportLayout, ReportElement, ReportElementType, DataBinding, ElementStyle, ReportParameter, ReportFilter, ReportSorting, ReportGrouping, CalculatedField, ReportFormatting, ConditionalFormat, DrillDownConfig, DrillDownLevel, Dashboard, DashboardLayout, DashboardWidget, WidgetType, GridPosition, WidgetConfig, ChartType, ChartSeries, ChartAxis, LegendConfig, TableColumn, MapConfig, WidgetInteraction, DashboardFilter, DashboardTheme, SharingConfig, SharedUser, ETLPipeline, ETLSource, ETLTransformation, ETLTransformationType, ETLDestination, ETLSchedule, ETLMonitoring, ETLRun, ETLError, Cube, CubeDimension, CubeMeasure, CubeHierarchy, NiceReportBuilderProps, NiceDashboardStudioProps, NiceETLBuilderProps, NiceCubeBrowserProps, } from './types';
|
|
6
|
+
export type { DataSource, DataSourceConfig, DataSchema, TableSchema, ColumnSchema, Relationship, Report, ReportQuery, QueryJoin, QueryColumn, QueryCondition, ReportLayout, ReportElement, ReportElementType, DataBinding, ElementStyle, ReportParameter, ReportFilter, ReportSorting, ReportGrouping, CalculatedField, ReportFormatting, ConditionalFormat, DrillDownConfig, DrillDownLevel, Dashboard, DashboardLayout, DashboardWidget, WidgetType, GridPosition, WidgetConfig, ChartType, ChartSeries, ChartAxis, LegendConfig, TableColumn, MapConfig, WidgetInteraction, DashboardFilter, DashboardTheme, SharingConfig, SharedUser, ETLPipeline, ETLSource, ETLTransformation, ETLTransformationType, ETLDestination, ETLSchedule, ETLMonitoring, ETLRun, ETLError, Cube, CubeDimension, CubeMeasure, CubeHierarchy, NiceETLBuilderProps, NiceCubeBrowserProps, } from './types';
|