UNPKG

@progress/kendo-vue-pdf

Version:
9 lines (8 loc) 1.84 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@progress/kendo-vue-common"),b=require("./export-element.js"),f=require("vue");function C(d){return(t,c={},l,n,p)=>x(d,t,c,l,n,p)}function x(d,t,c={},l,n,p){let o,i,r,e;h();function h(){if(!v.canUseDOM)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(p){const a={render:function(){return f.h(t.type,{...t.props,...s},t.children)},store:t.$store,mounted:function(){this.$el.style&&(this.$el.style.width="1000px"),m.call(this)}};e=f.createApp(a),e.mount(i)}else{const a=Object.getPrototypeOf(t).constructor;e=new a({propsData:Object.assign({},t.$props,s),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(y.call(this),c,$)}function $(){e.unmount?e.unmount():e.$destroy(),document.body.removeChild(o),document.body.removeChild(r),o=r=void 0,l&&l()}function y(){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.exportElement(u);return r.appendChild(s),document.body.appendChild(r),s}}exports.provideSaveGridPDF=C;