vg-print 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vg-print.cjs.js +1 -1
- package/dist/vg-print.es.js +1 -1
- package/dist/vg-print.umd.js +1 -1
- package/package.json +4 -2
package/dist/vg-print.cjs.js
CHANGED
|
@@ -2395,4 +2395,4 @@ table.hiprint-printElement-tableTarget {
|
|
|
2395
2395
|
text-align: left;
|
|
2396
2396
|
clear: both;
|
|
2397
2397
|
}
|
|
2398
|
-
`,version="1.0.
|
|
2398
|
+
`,version="1.0.20";let autoConnect=function(_e){console.log("autoConnect"),window.autoConnect=!0,window.hiwebSocket&&window.hiwebSocket.hasIo()&&window.hiwebSocket.start(_e)},disAutoConnect=function(){console.log("disAutoConnect"),window.autoConnect=!1,window.hiwebSocket&&window.hiwebSocket.hasIo()&&window.hiwebSocket.stop()},injectPrintLock=function(){try{const _e="hiprint-print-lock-css";if(document.getElementById(_e))return;const $e=document.createElement("style");$e.id=_e,$e.type="text/css",$e.media="print",$e.textContent=String(printLockCss||""),document.head.appendChild($e)}catch{}},hiPrintPlugin={disAutoConnect,install:function(_e,$e="$hiPrint",Ae=!0){Ae||disAutoConnect();let je=_e.prototype||_e.config.globalProperties;je[$e]=hiprint,je.$print=function(ke=defaultElementTypeProvider,Ie,...xe){hiprint.init({providers:[new ke]});var Be=new hiprint.PrintTemplate({template:Ie});return Be.print(...xe),Be},je.$print2=function(ke=defaultElementTypeProvider,Ie,...xe){hiprint.init({providers:[new ke]});var Be=new hiprint.PrintTemplate({template:Ie});return Be.print2(...xe),Be}}};hiprint.version=version;window.hiprint=hiprint;function print(_e=defaultElementTypeProvider,$e,...Ae){hiprint.init({providers:[new _e]});const je=new hiprint.PrintTemplate({template:$e});return je.print(...Ae),je}function print2(_e=defaultElementTypeProvider,$e,...Ae){hiprint.init({providers:[new _e]});const je=new hiprint.PrintTemplate({template:$e});return je.print2(...Ae),je}exports.Designer=Designer;exports.DragBox=DragBox;exports.Header=Header;exports.Preview=Preview;exports.autoConnect=autoConnect;exports.defaultElementTypeProvider=defaultElementTypeProvider;exports.disAutoConnect=disAutoConnect;exports.hiPrintPlugin=hiPrintPlugin;exports.hiprint=hiprint;exports.injectPrintLock=injectPrintLock;exports.print=print;exports.print2=print2;
|
package/dist/vg-print.es.js
CHANGED
|
@@ -59525,7 +59525,7 @@ table.hiprint-printElement-tableTarget {
|
|
|
59525
59525
|
text-align: left;
|
|
59526
59526
|
clear: both;
|
|
59527
59527
|
}
|
|
59528
|
-
`, version = "1.0.
|
|
59528
|
+
`, version = "1.0.20";
|
|
59529
59529
|
let autoConnect = function(_e) {
|
|
59530
59530
|
console.log("autoConnect"), window.autoConnect = !0, window.hiwebSocket && window.hiwebSocket.hasIo() && window.hiwebSocket.start(_e);
|
|
59531
59531
|
}, disAutoConnect = function() {
|
package/dist/vg-print.umd.js
CHANGED
|
@@ -2395,6 +2395,6 @@ table.hiprint-printElement-tableTarget {
|
|
|
2395
2395
|
text-align: left;
|
|
2396
2396
|
clear: both;
|
|
2397
2397
|
}
|
|
2398
|
-
`,version="1.0.
|
|
2398
|
+
`,version="1.0.20";let autoConnect=function(_e){console.log("autoConnect"),window.autoConnect=!0,window.hiwebSocket&&window.hiwebSocket.hasIo()&&window.hiwebSocket.start(_e)},disAutoConnect=function(){console.log("disAutoConnect"),window.autoConnect=!1,window.hiwebSocket&&window.hiwebSocket.hasIo()&&window.hiwebSocket.stop()},injectPrintLock=function(){try{const _e="hiprint-print-lock-css";if(document.getElementById(_e))return;const $e=document.createElement("style");$e.id=_e,$e.type="text/css",$e.media="print",$e.textContent=String(printLockCss||""),document.head.appendChild($e)}catch{}},hiPrintPlugin={disAutoConnect,install:function(_e,$e="$hiPrint",Ae=!0){Ae||disAutoConnect();let je=_e.prototype||_e.config.globalProperties;je[$e]=hiprint,je.$print=function(ke=defaultElementTypeProvider,Ie,...xe){hiprint.init({providers:[new ke]});var Be=new hiprint.PrintTemplate({template:Ie});return Be.print(...xe),Be},je.$print2=function(ke=defaultElementTypeProvider,Ie,...xe){hiprint.init({providers:[new ke]});var Be=new hiprint.PrintTemplate({template:Ie});return Be.print2(...xe),Be}}};hiprint.version=version,window.hiprint=hiprint;function print(_e=defaultElementTypeProvider,$e,...Ae){hiprint.init({providers:[new _e]});const je=new hiprint.PrintTemplate({template:$e});return je.print(...Ae),je}function print2(_e=defaultElementTypeProvider,$e,...Ae){hiprint.init({providers:[new _e]});const je=new hiprint.PrintTemplate({template:$e});return je.print2(...Ae),je}/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */function _typeof(_e){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($e){return typeof $e}:function($e){return $e&&typeof Symbol=="function"&&$e.constructor===Symbol&&$e!==Symbol.prototype?"symbol":typeof $e},_typeof(_e)}function _setPrototypeOf(_e,$e){return _setPrototypeOf=Object.setPrototypeOf||function(je,ke){return je.__proto__=ke,je},_setPrototypeOf(_e,$e)}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(_e,$e,Ae){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(ke,Ie,xe){var Be=[null];Be.push.apply(Be,Ie);var Ce=Function.bind.apply(ke,Be),Ee=new Ce;return xe&&_setPrototypeOf(Ee,xe.prototype),Ee},_construct.apply(null,arguments)}function _toConsumableArray(_e){return _arrayWithoutHoles(_e)||_iterableToArray(_e)||_unsupportedIterableToArray(_e)||_nonIterableSpread()}function _arrayWithoutHoles(_e){if(Array.isArray(_e))return _arrayLikeToArray(_e)}function _iterableToArray(_e){if(typeof Symbol<"u"&&_e[Symbol.iterator]!=null||_e["@@iterator"]!=null)return Array.from(_e)}function _unsupportedIterableToArray(_e,$e){if(_e){if(typeof _e=="string")return _arrayLikeToArray(_e,$e);var Ae=Object.prototype.toString.call(_e).slice(8,-1);if(Ae==="Object"&&_e.constructor&&(Ae=_e.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(_e);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return _arrayLikeToArray(_e,$e)}}function _arrayLikeToArray(_e,$e){($e==null||$e>_e.length)&&($e=_e.length);for(var Ae=0,je=new Array($e);Ae<$e;Ae++)je[Ae]=_e[Ae];return je}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2399
2399
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var hasOwnProperty=Object.hasOwnProperty,setPrototypeOf=Object.setPrototypeOf,isFrozen=Object.isFrozen,getPrototypeOf=Object.getPrototypeOf,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,freeze=Object.freeze,seal=Object.seal,create=Object.create,_ref=typeof Reflect<"u"&&Reflect,apply=_ref.apply,construct=_ref.construct;apply||(apply=function($e,Ae,je){return $e.apply(Ae,je)}),freeze||(freeze=function($e){return $e}),seal||(seal=function($e){return $e}),construct||(construct=function($e,Ae){return _construct($e,_toConsumableArray(Ae))});var arrayForEach=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(_e){return function($e){for(var Ae=arguments.length,je=new Array(Ae>1?Ae-1:0),ke=1;ke<Ae;ke++)je[ke-1]=arguments[ke];return apply(_e,$e,je)}}function unconstruct(_e){return function(){for(var $e=arguments.length,Ae=new Array($e),je=0;je<$e;je++)Ae[je]=arguments[je];return construct(_e,Ae)}}function addToSet(_e,$e,Ae){var je;Ae=(je=Ae)!==null&&je!==void 0?je:stringToLowerCase,setPrototypeOf&&setPrototypeOf(_e,null);for(var ke=$e.length;ke--;){var Ie=$e[ke];if(typeof Ie=="string"){var xe=Ae(Ie);xe!==Ie&&(isFrozen($e)||($e[ke]=xe),Ie=xe)}_e[Ie]=!0}return _e}function clone(_e){var $e=create(null),Ae;for(Ae in _e)apply(hasOwnProperty,_e,[Ae])===!0&&($e[Ae]=_e[Ae]);return $e}function lookupGetter(_e,$e){for(;_e!==null;){var Ae=getOwnPropertyDescriptor(_e,$e);if(Ae){if(Ae.get)return unapply(Ae.get);if(typeof Ae.value=="function")return unapply(Ae.value)}_e=getPrototypeOf(_e)}function je(ke){return console.warn("fallback value for",ke),null}return je}var html$1=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),svg$1=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mathMl$1=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=freeze(["#text"]),html=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),svg=freeze(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mathMl=freeze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ERB_EXPR=seal(/<%[\w\W]*|[\w\W]*%>/gm),TMPLIT_EXPR=seal(/\${[\w\W]*}/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]+$/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),CUSTOM_ELEMENT=seal(/^[a-z][.\w]*(-[.\w]+)+$/i),getGlobal=function _e(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function _e($e,Ae){if(_typeof($e)!=="object"||typeof $e.createPolicy!="function")return null;var je=null,ke="data-tt-policy-suffix";Ae.currentScript&&Ae.currentScript.hasAttribute(ke)&&(je=Ae.currentScript.getAttribute(ke));var Ie="dompurify"+(je?"#"+je:"");try{return $e.createPolicy(Ie,{createHTML:function(Be){return Be},createScriptURL:function(Be){return Be}})}catch{return console.warn("TrustedTypes policy "+Ie+" could not be created."),null}};function createDOMPurify(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal(),$e=function(Mr){return createDOMPurify(Mr)};if($e.version="2.5.8",$e.removed=[],!_e||!_e.document||_e.document.nodeType!==9)return $e.isSupported=!1,$e;var Ae=_e.document,je=_e.document,ke=_e.DocumentFragment,Ie=_e.HTMLTemplateElement,xe=_e.Node,Be=_e.Element,Ce=_e.NodeFilter,Ee=_e.NamedNodeMap,Se=Ee===void 0?_e.NamedNodeMap||_e.MozNamedAttrMap:Ee,Pe=_e.HTMLFormElement,Me=_e.DOMParser,Te=_e.trustedTypes,Fe=Be.prototype,He=lookupGetter(Fe,"cloneNode"),Ge=lookupGetter(Fe,"nextSibling"),Re=lookupGetter(Fe,"childNodes"),ze=lookupGetter(Fe,"parentNode");if(typeof Ie=="function"){var Xe=je.createElement("template");Xe.content&&Xe.content.ownerDocument&&(je=Xe.content.ownerDocument)}var St=_createTrustedTypesPolicy(Te,Ae),rr=St?St.createHTML(""):"",Ze=je,Ye=Ze.implementation,Ke=Ze.createNodeIterator,tr=Ze.createDocumentFragment,qe=Ze.getElementsByTagName,Oe=Ae.importNode,Je={};try{Je=clone(je).documentMode?je.documentMode:{}}catch{}var ir={};$e.isSupported=typeof ze=="function"&&Ye&&Ye.createHTMLDocument!==void 0&&Je!==9;var nr=MUSTACHE_EXPR,Ar=ERB_EXPR,dr=TMPLIT_EXPR,gr=DATA_ATTR,hr=ARIA_ATTR,kr=IS_SCRIPT_OR_DATA,lr=ATTR_WHITESPACE,Rr=CUSTOM_ELEMENT,or=IS_ALLOWED_URI,cr=null,mr=addToSet({},[].concat(_toConsumableArray(html$1),_toConsumableArray(svg$1),_toConsumableArray(svgFilters),_toConsumableArray(mathMl$1),_toConsumableArray(text))),wr=null,Tr=addToSet({},[].concat(_toConsumableArray(html),_toConsumableArray(svg),_toConsumableArray(mathMl),_toConsumableArray(xml))),Pr=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Lr=null,Qr=null,Wr=!0,Xr=!0,_i=!1,Ai=!0,xi=!1,Vr=!0,Cr=!1,Mi=!1,wi=!1,si=!1,fi=!1,gi=!1,ci=!0,yi=!1,Ei="user-content-",Li=!0,Fi=!1,Oi={},Vi=null,Si=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Di=null,ji=addToSet({},["audio","video","img","source","image","track"]),An=null,Xi=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sn="http://www.w3.org/1998/Math/MathML",Ni="http://www.w3.org/2000/svg",sr="http://www.w3.org/1999/xhtml",yr=sr,jr=!1,Fr=null,Ur=addToSet({},[sn,Ni,sr],stringToString),Jr,Sr=["application/xhtml+xml","text/html"],Kr="text/html",Ir,Or=null,Yr=je.createElement("form"),$i=function(Mr){return Mr instanceof RegExp||Mr instanceof Function},Hr=function(Mr){Or&&Or===Mr||((!Mr||_typeof(Mr)!=="object")&&(Mr={}),Mr=clone(Mr),Jr=Sr.indexOf(Mr.PARSER_MEDIA_TYPE)===-1?Jr=Kr:Jr=Mr.PARSER_MEDIA_TYPE,Ir=Jr==="application/xhtml+xml"?stringToString:stringToLowerCase,cr="ALLOWED_TAGS"in Mr?addToSet({},Mr.ALLOWED_TAGS,Ir):mr,wr="ALLOWED_ATTR"in Mr?addToSet({},Mr.ALLOWED_ATTR,Ir):Tr,Fr="ALLOWED_NAMESPACES"in Mr?addToSet({},Mr.ALLOWED_NAMESPACES,stringToString):Ur,An="ADD_URI_SAFE_ATTR"in Mr?addToSet(clone(Xi),Mr.ADD_URI_SAFE_ATTR,Ir):Xi,Di="ADD_DATA_URI_TAGS"in Mr?addToSet(clone(ji),Mr.ADD_DATA_URI_TAGS,Ir):ji,Vi="FORBID_CONTENTS"in Mr?addToSet({},Mr.FORBID_CONTENTS,Ir):Si,Lr="FORBID_TAGS"in Mr?addToSet({},Mr.FORBID_TAGS,Ir):{},Qr="FORBID_ATTR"in Mr?addToSet({},Mr.FORBID_ATTR,Ir):{},Oi="USE_PROFILES"in Mr?Mr.USE_PROFILES:!1,Wr=Mr.ALLOW_ARIA_ATTR!==!1,Xr=Mr.ALLOW_DATA_ATTR!==!1,_i=Mr.ALLOW_UNKNOWN_PROTOCOLS||!1,Ai=Mr.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xi=Mr.SAFE_FOR_TEMPLATES||!1,Vr=Mr.SAFE_FOR_XML!==!1,Cr=Mr.WHOLE_DOCUMENT||!1,si=Mr.RETURN_DOM||!1,fi=Mr.RETURN_DOM_FRAGMENT||!1,gi=Mr.RETURN_TRUSTED_TYPE||!1,wi=Mr.FORCE_BODY||!1,ci=Mr.SANITIZE_DOM!==!1,yi=Mr.SANITIZE_NAMED_PROPS||!1,Li=Mr.KEEP_CONTENT!==!1,Fi=Mr.IN_PLACE||!1,or=Mr.ALLOWED_URI_REGEXP||or,yr=Mr.NAMESPACE||sr,Pr=Mr.CUSTOM_ELEMENT_HANDLING||{},Mr.CUSTOM_ELEMENT_HANDLING&&$i(Mr.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Pr.tagNameCheck=Mr.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Mr.CUSTOM_ELEMENT_HANDLING&&$i(Mr.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Pr.attributeNameCheck=Mr.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Mr.CUSTOM_ELEMENT_HANDLING&&typeof Mr.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Pr.allowCustomizedBuiltInElements=Mr.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xi&&(Xr=!1),fi&&(si=!0),Oi&&(cr=addToSet({},_toConsumableArray(text)),wr=[],Oi.html===!0&&(addToSet(cr,html$1),addToSet(wr,html)),Oi.svg===!0&&(addToSet(cr,svg$1),addToSet(wr,svg),addToSet(wr,xml)),Oi.svgFilters===!0&&(addToSet(cr,svgFilters),addToSet(wr,svg),addToSet(wr,xml)),Oi.mathMl===!0&&(addToSet(cr,mathMl$1),addToSet(wr,mathMl),addToSet(wr,xml))),Mr.ADD_TAGS&&(cr===mr&&(cr=clone(cr)),addToSet(cr,Mr.ADD_TAGS,Ir)),Mr.ADD_ATTR&&(wr===Tr&&(wr=clone(wr)),addToSet(wr,Mr.ADD_ATTR,Ir)),Mr.ADD_URI_SAFE_ATTR&&addToSet(An,Mr.ADD_URI_SAFE_ATTR,Ir),Mr.FORBID_CONTENTS&&(Vi===Si&&(Vi=clone(Vi)),addToSet(Vi,Mr.FORBID_CONTENTS,Ir)),Li&&(cr["#text"]=!0),Cr&&addToSet(cr,["html","head","body"]),cr.table&&(addToSet(cr,["tbody"]),delete Lr.tbody),freeze&&freeze(Mr),Or=Mr)},ti=addToSet({},["mi","mo","mn","ms","mtext"]),Zr=addToSet({},["annotation-xml"]),Gr=addToSet({},["title","style","font","a","script"]),ai=addToSet({},svg$1);addToSet(ai,svgFilters),addToSet(ai,svgDisallowed);var qr=addToSet({},mathMl$1);addToSet(qr,mathMlDisallowed);var ni=function(Mr){var hi=ze(Mr);(!hi||!hi.tagName)&&(hi={namespaceURI:yr,tagName:"template"});var pi=stringToLowerCase(Mr.tagName),un=stringToLowerCase(hi.tagName);return Fr[Mr.namespaceURI]?Mr.namespaceURI===Ni?hi.namespaceURI===sr?pi==="svg":hi.namespaceURI===sn?pi==="svg"&&(un==="annotation-xml"||ti[un]):!!ai[pi]:Mr.namespaceURI===sn?hi.namespaceURI===sr?pi==="math":hi.namespaceURI===Ni?pi==="math"&&Zr[un]:!!qr[pi]:Mr.namespaceURI===sr?hi.namespaceURI===Ni&&!Zr[un]||hi.namespaceURI===sn&&!ti[un]?!1:!qr[pi]&&(Gr[pi]||!ai[pi]):!!(Jr==="application/xhtml+xml"&&Fr[Mr.namespaceURI]):!1},mi=function(Mr){arrayPush($e.removed,{element:Mr});try{Mr.parentNode.removeChild(Mr)}catch{try{Mr.outerHTML=rr}catch{Mr.remove()}}},Ii=function(Mr,hi){try{arrayPush($e.removed,{attribute:hi.getAttributeNode(Mr),from:hi})}catch{arrayPush($e.removed,{attribute:null,from:hi})}if(hi.removeAttribute(Mr),Mr==="is"&&!wr[Mr])if(si||fi)try{mi(hi)}catch{}else try{hi.setAttribute(Mr,"")}catch{}},Hi=function(Mr){var hi,pi;if(wi)Mr="<remove></remove>"+Mr;else{var un=stringMatch(Mr,/^[\r\n\t ]+/);pi=un&&un[0]}Jr==="application/xhtml+xml"&&yr===sr&&(Mr='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Mr+"</body></html>");var bn=St?St.createHTML(Mr):Mr;if(yr===sr)try{hi=new Me().parseFromString(bn,Jr)}catch{}if(!hi||!hi.documentElement){hi=Ye.createDocument(yr,"template",null);try{hi.documentElement.innerHTML=jr?rr:bn}catch{}}var hn=hi.body||hi.documentElement;return Mr&&pi&&hn.insertBefore(je.createTextNode(pi),hn.childNodes[0]||null),yr===sr?qe.call(hi,Cr?"html":"body")[0]:Cr?hi.documentElement:hn},Zi=function(Mr){return Ke.call(Mr.ownerDocument||Mr,Mr,Ce.SHOW_ELEMENT|Ce.SHOW_COMMENT|Ce.SHOW_TEXT|Ce.SHOW_PROCESSING_INSTRUCTION|Ce.SHOW_CDATA_SECTION,null,!1)},Gi=function(Mr){return Mr instanceof Pe&&(typeof Mr.nodeName!="string"||typeof Mr.textContent!="string"||typeof Mr.removeChild!="function"||!(Mr.attributes instanceof Se)||typeof Mr.removeAttribute!="function"||typeof Mr.setAttribute!="function"||typeof Mr.namespaceURI!="string"||typeof Mr.insertBefore!="function"||typeof Mr.hasChildNodes!="function")},li=function(Mr){return _typeof(xe)==="object"?Mr instanceof xe:Mr&&_typeof(Mr)==="object"&&typeof Mr.nodeType=="number"&&typeof Mr.nodeName=="string"},Ti=function(Mr,hi,pi){ir[Mr]&&arrayForEach(ir[Mr],function(un){un.call($e,hi,pi,Or)})},Ui=function(Mr){var hi;if(Ti("beforeSanitizeElements",Mr,null),Gi(Mr)||regExpTest(/[\u0080-\uFFFF]/,Mr.nodeName))return mi(Mr),!0;var pi=Ir(Mr.nodeName);if(Ti("uponSanitizeElement",Mr,{tagName:pi,allowedTags:cr}),Mr.hasChildNodes()&&!li(Mr.firstElementChild)&&(!li(Mr.content)||!li(Mr.content.firstElementChild))&®ExpTest(/<[/\w]/g,Mr.innerHTML)&®ExpTest(/<[/\w]/g,Mr.textContent)||pi==="select"&®ExpTest(/<template/i,Mr.innerHTML)||Mr.nodeType===7||Vr&&Mr.nodeType===8&®ExpTest(/<[/\w]/g,Mr.data))return mi(Mr),!0;if(!cr[pi]||Lr[pi]){if(!Lr[pi]&&tn(pi)&&(Pr.tagNameCheck instanceof RegExp&®ExpTest(Pr.tagNameCheck,pi)||Pr.tagNameCheck instanceof Function&&Pr.tagNameCheck(pi)))return!1;if(Li&&!Vi[pi]){var un=ze(Mr)||Mr.parentNode,bn=Re(Mr)||Mr.childNodes;if(bn&&un)for(var hn=bn.length,Cn=hn-1;Cn>=0;--Cn){var Wn=He(bn[Cn],!0);Wn.__removalCount=(Mr.__removalCount||0)+1,un.insertBefore(Wn,Ge(Mr))}}return mi(Mr),!0}return Mr instanceof Be&&!ni(Mr)||(pi==="noscript"||pi==="noembed"||pi==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,Mr.innerHTML)?(mi(Mr),!0):(xi&&Mr.nodeType===3&&(hi=Mr.textContent,hi=stringReplace(hi,nr," "),hi=stringReplace(hi,Ar," "),hi=stringReplace(hi,dr," "),Mr.textContent!==hi&&(arrayPush($e.removed,{element:Mr.cloneNode()}),Mr.textContent=hi)),Ti("afterSanitizeElements",Mr,null),!1)},Ri=function(Mr,hi,pi){if(ci&&(hi==="id"||hi==="name")&&(pi in je||pi in Yr))return!1;if(!(Xr&&!Qr[hi]&®ExpTest(gr,hi))){if(!(Wr&®ExpTest(hr,hi))){if(!wr[hi]||Qr[hi]){if(!(tn(Mr)&&(Pr.tagNameCheck instanceof RegExp&®ExpTest(Pr.tagNameCheck,Mr)||Pr.tagNameCheck instanceof Function&&Pr.tagNameCheck(Mr))&&(Pr.attributeNameCheck instanceof RegExp&®ExpTest(Pr.attributeNameCheck,hi)||Pr.attributeNameCheck instanceof Function&&Pr.attributeNameCheck(hi))||hi==="is"&&Pr.allowCustomizedBuiltInElements&&(Pr.tagNameCheck instanceof RegExp&®ExpTest(Pr.tagNameCheck,pi)||Pr.tagNameCheck instanceof Function&&Pr.tagNameCheck(pi))))return!1}else if(!An[hi]){if(!regExpTest(or,stringReplace(pi,lr,""))){if(!((hi==="src"||hi==="xlink:href"||hi==="href")&&Mr!=="script"&&stringIndexOf(pi,"data:")===0&&Di[Mr])){if(!(_i&&!regExpTest(kr,stringReplace(pi,lr,"")))){if(pi)return!1}}}}}}return!0},tn=function(Mr){return Mr!=="annotation-xml"&&stringMatch(Mr,Rr)},pn=function(Mr){var hi,pi,un,bn;Ti("beforeSanitizeAttributes",Mr,null);var hn=Mr.attributes;if(!(!hn||Gi(Mr))){var Cn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wr};for(bn=hn.length;bn--;){hi=hn[bn];var Wn=hi,xn=Wn.name,Vn=Wn.namespaceURI;if(pi=xn==="value"?hi.value:stringTrim(hi.value),un=Ir(xn),Cn.attrName=un,Cn.attrValue=pi,Cn.keepAttr=!0,Cn.forceKeepAttr=void 0,Ti("uponSanitizeAttribute",Mr,Cn),pi=Cn.attrValue,!Cn.forceKeepAttr&&(Ii(xn,Mr),!!Cn.keepAttr)){if(!Ai&®ExpTest(/\/>/i,pi)){Ii(xn,Mr);continue}xi&&(pi=stringReplace(pi,nr," "),pi=stringReplace(pi,Ar," "),pi=stringReplace(pi,dr," "));var On=Ir(Mr.nodeName);if(Ri(On,un,pi)){if(yi&&(un==="id"||un==="name")&&(Ii(xn,Mr),pi=Ei+pi),Vr&®ExpTest(/((--!?|])>)|<\/(style|title)/i,pi)){Ii(xn,Mr);continue}if(St&&_typeof(Te)==="object"&&typeof Te.getAttributeType=="function"&&!Vn)switch(Te.getAttributeType(On,un)){case"TrustedHTML":{pi=St.createHTML(pi);break}case"TrustedScriptURL":{pi=St.createScriptURL(pi);break}}try{Vn?Mr.setAttributeNS(Vn,xn,pi):Mr.setAttribute(xn,pi),Gi(Mr)?mi(Mr):arrayPop($e.removed)}catch{}}}}Ti("afterSanitizeAttributes",Mr,null)}},an=function Bi(Mr){var hi,pi=Zi(Mr);for(Ti("beforeSanitizeShadowDOM",Mr,null);hi=pi.nextNode();)Ti("uponSanitizeShadowNode",hi,null),Ui(hi),pn(hi),hi.content instanceof ke&&Bi(hi.content);Ti("afterSanitizeShadowDOM",Mr,null)};return $e.sanitize=function(Bi){var Mr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},hi,pi,un,bn,hn;if(jr=!Bi,jr&&(Bi="<!-->"),typeof Bi!="string"&&!li(Bi))if(typeof Bi.toString=="function"){if(Bi=Bi.toString(),typeof Bi!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!$e.isSupported){if(_typeof(_e.toStaticHTML)==="object"||typeof _e.toStaticHTML=="function"){if(typeof Bi=="string")return _e.toStaticHTML(Bi);if(li(Bi))return _e.toStaticHTML(Bi.outerHTML)}return Bi}if(Mi||Hr(Mr),$e.removed=[],typeof Bi=="string"&&(Fi=!1),Fi){if(Bi.nodeName){var Cn=Ir(Bi.nodeName);if(!cr[Cn]||Lr[Cn])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Bi instanceof xe)hi=Hi("<!---->"),pi=hi.ownerDocument.importNode(Bi,!0),pi.nodeType===1&&pi.nodeName==="BODY"||pi.nodeName==="HTML"?hi=pi:hi.appendChild(pi);else{if(!si&&!xi&&!Cr&&Bi.indexOf("<")===-1)return St&&gi?St.createHTML(Bi):Bi;if(hi=Hi(Bi),!hi)return si?null:gi?rr:""}hi&&wi&&mi(hi.firstChild);for(var Wn=Zi(Fi?Bi:hi);un=Wn.nextNode();)un.nodeType===3&&un===bn||(Ui(un),pn(un),un.content instanceof ke&&an(un.content),bn=un);if(bn=null,Fi)return Bi;if(si){if(fi)for(hn=tr.call(hi.ownerDocument);hi.firstChild;)hn.appendChild(hi.firstChild);else hn=hi;return(wr.shadowroot||wr.shadowrootmod)&&(hn=Oe.call(Ae,hn,!0)),hn}var xn=Cr?hi.outerHTML:hi.innerHTML;return Cr&&cr["!doctype"]&&hi.ownerDocument&&hi.ownerDocument.doctype&&hi.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,hi.ownerDocument.doctype.name)&&(xn="<!DOCTYPE "+hi.ownerDocument.doctype.name+`>
|
|
2400
2400
|
`+xn),xi&&(xn=stringReplace(xn,nr," "),xn=stringReplace(xn,Ar," "),xn=stringReplace(xn,dr," ")),St&&gi?St.createHTML(xn):xn},$e.setConfig=function(Bi){Hr(Bi),Mi=!0},$e.clearConfig=function(){Or=null,Mi=!1},$e.isValidAttribute=function(Bi,Mr,hi){Or||Hr({});var pi=Ir(Bi),un=Ir(Mr);return Ri(pi,un,hi)},$e.addHook=function(Bi,Mr){typeof Mr=="function"&&(ir[Bi]=ir[Bi]||[],arrayPush(ir[Bi],Mr))},$e.removeHook=function(Bi){if(ir[Bi])return arrayPop(ir[Bi])},$e.removeHooks=function(Bi){ir[Bi]&&(ir[Bi]=[])},$e.removeAllHooks=function(){ir={}},$e}var purify=createDOMPurify();const purify_es=Object.freeze(Object.defineProperty({__proto__:null,default:purify},Symbol.toStringTag,{value:"Module"}));exports.Designer=Designer,exports.DragBox=DragBox,exports.Header=Header,exports.Preview=Preview,exports.autoConnect=autoConnect,exports.defaultElementTypeProvider=defaultElementTypeProvider,exports.disAutoConnect=disAutoConnect,exports.hiPrintPlugin=hiPrintPlugin,exports.hiprint=hiprint,exports.injectPrintLock=injectPrintLock,exports.print=print,exports.print2=print2,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vg-print",
|
|
3
3
|
"description": "hiprint for Vue2.x / Vue3.x 支持拖拽(分页(不分页)、表头表脚、样式设置、复制粘贴、缩放、撤销重做)生成打印模板、导出json模板数据、静默打印/获取MAC地址(借助客户端)",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"author": "CcSimple",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/vg-print.cjs.js",
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
"print"
|
|
31
31
|
],
|
|
32
32
|
"files": [
|
|
33
|
-
"dist"
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
34
36
|
],
|
|
35
37
|
"type": "module",
|
|
36
38
|
"scripts": {
|