@progress/kendo-vue-pdf
Version:
73 lines (72 loc) • 2.3 kB
JavaScript
/**
* @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 y } from "@progress/kendo-vue-common";
import { exportElement as b } from "./export-element.mjs";
import { createApp as v, h as x } from "vue";
function F(p) {
return (t, d = {}, l, n, c) => C(p, t, d, l, n, c);
}
function C(p, t, d = {}, l, n, c) {
let o, i, r, e;
f();
function f() {
if (!y)
return;
o = document.createElement("div");
const u = {
position: "absolute",
left: "-5000px",
top: "0px"
};
Object.assign(o.style, u), i = document.createElement("div"), o.appendChild(i), document.body.appendChild(o);
const s = n && {
dataItems: n,
total: n.length,
pageSize: n.length,
skip: 0
};
if (c) {
const m = {
render: function() {
return x(t.type, {
...t.props,
...s
}, t.children);
},
store: t.$store,
mounted: function() {
this.$el.style && (this.$el.style.width = "1000px"), a.call(this);
}
};
e = v(m), e.mount(i);
} else {
const m = Object.getPrototypeOf(t).constructor;
e = new m({
propsData: Object.assign({}, t.$props, s),
store: t.$store,
mounted: () => {
e.$el.style && (e.$el.style.width = "1000px"), a.call(e);
}
}), e.$slots = t.$slots, e.$scopedSlots = t.$scopedSlots, e.$mount(i);
}
}
function a() {
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, l && l();
}
function $() {
r = document.createElement("div"), r.className = "k-grid-pdf-export-element";
const u = this.$el && (this.$el.nodeType === 3 || this.$el.nodeType === 8) ? this.$el.nextElementSibling : this.$el, s = b(u);
return r.appendChild(s), document.body.appendChild(r), s;
}
}
export {
F as provideSaveGridPDF
};