UNPKG

@progress/kendo-vue-pdf

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