UNPKG

@progress/kendo-vue-pdf

Version:
67 lines (66 loc) 2.26 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { canUseDOM as $ } from "@progress/kendo-vue-common"; import { createApp as y, h as b } from "vue"; import { exportElement as v } from "./export-element.mjs"; function D(d) { return (t, c = {}, s, n, u) => x(d, t, c, s, n, u); } function x(d, t, c = {}, s, n, u) { let o, i, r, e; a(); function a() { if (!$) return; o = document.createElement("div"), o.setAttribute("style", "position:absolute; left: -5000px; top: 0px;"), i = document.createElement("div"), o.appendChild(i), document.body.appendChild(o); const p = n && { dataItems: n, total: n.length, pageSize: n.length, skip: 0 }; if (u) { const l = { render: function() { return b(t.type, { ...t.props, ...p }, t.children); }, store: t.$store, mounted: function() { this.$el.style && (this.$el.style.width = "1000px"), m.call(this); } }; e = y(l), e.mount(i); } else { const l = Object.getPrototypeOf(t).constructor; e = new l({ propsData: Object.assign({}, t.$props, p), store: t.$store, mounted: () => { e.$el.style && (e.$el.style.width = "1000px"), m.call(e); } }), e.$slots = t.$slots, e.$scopedSlots = t.$scopedSlots, e.$mount(i); } } function m() { d(h.call(this), c, f); } function f() { e.unmount ? e.unmount() : e.$destroy(), document.body.removeChild(o), document.body.removeChild(r), o = r = void 0, s && s(); } function h() { r = document.createElement("div"), r.className = "k-treelist-pdf-export-element"; const p = this.$el && (this.$el.nodeType === 3 || this.$el.nodeType === 8) ? this.$el.nextElementSibling : this.$el, l = v(p); return r.appendChild(l), document.body.appendChild(r), l; } } export { D as provideSaveTreeListPDF };