UNPKG

dap-design-system

Version:

Official design system for the DÁP (dap.gov.hu)

62 lines (61 loc) 1.69 kB
var E = Object.defineProperty; var i = Object.getOwnPropertySymbols; var b = Object.prototype.hasOwnProperty, V = Object.prototype.propertyIsEnumerable; var s = (n, e, r) => e in n ? E(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, c = (n, e) => { for (var r in e || (e = {})) b.call(e, r) && s(n, r, e[r]); if (i) for (var r of i(e)) V.call(e, r) && s(n, r, e[r]); return n; }; import { createApp as C, h as j } from "vue"; function A(n, e) { const a = ((o) => typeof o == "object" && o !== null && "component" in o && typeof o.component != "undefined")(n) ? n : { component: n, props: e }, { component: d, props: f, on: p, children: m } = a; let t = null; return { render: (o) => { t = C({ render() { const l = {}; return p && Object.entries(p).forEach(([u, h]) => { const y = `on${u.charAt(0).toUpperCase()}${u.slice(1)}`; l[y] = h; }), j( d, c(c({}, f), l), m ); } }); try { if (t) t.mount(o); else throw new Error("Failed to create Vue app"); } catch (l) { console.error("Error mounting Vue component in datatable cell:", l), o.textContent = "Error rendering cell"; } }, cleanup: () => { if (t !== null) try { t.unmount(); } catch (o) { console.error( "Error unmounting Vue component in datatable cell:", o ); } finally { t = null; } } }; } export { A as createVueCell }; //# sourceMappingURL=vue.js.map