diff -r db4de4f37b65 -r 67bf19c50fcc www/jqwidgets/jqxgrid.export.js --- a/www/jqwidgets/jqxgrid.export.js Sun Apr 11 10:53:20 2021 +0200 +++ b/www/jqwidgets/jqxgrid.export.js Mon Apr 12 16:03:38 2021 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v9.0.0 (2020-Jan) -Copyright (c) 2011-2020 jQWidgets. +jQWidgets v12.0.1 (2021-Mar) +Copyright (c) 2011-2021 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(b){b.extend(b.jqx._jqxGrid.prototype,{_exportData:function(R,J){var X=this;var N=typeof J==="string"?J:J.fileName;if(!N){N="jqxGrid"}if(!J||typeof J==="string"){J={header:true,filterBy:null,groupBy:null,style:null,fileName:N,pageOrientation:"portrait",expandChart:"+",collapseChar:"-"}}var ae=new b.jqx.dataAdapter.DataExporter({exportHeader:J.header});var V=[];ae.expandChar=J.expandChar;ae.collapseChar=J.collapseChar;ae.pageOrientation=J.pageOrientation;ae.style=J.style;ae.filterBy=J.filterBy;ae.groupBy=J.groupBy;var L=[];var W=X.columngroups||[];var Y=0;for(var U=0;U0&&X.columns.records[0].element?X.columns.records[0].element:X.host.find(".jqx-grid-header")[0]);var j=window.getComputedStyle(X.host.find(".jqx-grid-header")[0]);var ab=X.offsetWidth===0||X.offsetHeight===0;if(!ab){var ac=function(h){var g="Helvetica";var e=h.fontSize;var m=h.borderRightColor;var f=h.backgroundColor;var k=h.color;var d=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");function l(n){n=n.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!n){return"#ffffff"}return"#"+c(n[1])+c(n[2])+c(n[3]).toUpperCase()}function c(n){return isNaN(n)?"00":d[(n-n%16)/16]+d[n%16]}return{borderColor:l(m),fontSize:e,fontFamily:g,color:l(k),backgroundColor:l(f)}};var P=ac(aa);var T=ac(H);var M=ac(j);var a={height:"30px",border:"1px solid "+P.borderColor,fontFamily:M.fontFamily,fontSize:M.fontSize,color:M.color,backgroundColor:T.backgroundColor,fontWeight:"400"};var ag={border:"1px solid "+P.borderColor,fontFamily:P.fontFamily,fontSize:P.fontSize};var O={height:X.rowsheight+"px"};for(var U=0;U1){var e=b(a.table[0].rows[1].cells[l]);if(!ar){ar=e}}if(!aq){aq=d}var m=this;var k=function(p){p.removeClass(a.toThemeProperty("jqx-grid-cell-selected"));p.removeClass(a.toThemeProperty("jqx-fill-state-pressed"));p.removeClass(a.toThemeProperty("jqx-grid-cell-hover"));p.removeClass(a.toThemeProperty("jqx-fill-state-hover"));if(m.customCellStyles){for(var o in m.customCellStyles){p.removeClass(m.customCellStyles[o])}}};k(d);if(e){k(e)}if(this.displayfield==null){return true}if(a.showaggregates){if(a.getcolumnaggregateddata){aj.push(a.getcolumnaggregateddata(this.displayfield,this.aggregates,true,ad))}}var g=a._getexportcolumntype(this);if(this.exportable&&(!this.hidden||M)){R[this.displayfield]={};R[this.displayfield].text=this.text;R[this.displayfield].width=parseInt(this.width);if(isNaN(R[this.displayfield].width)){R[this.displayfield].width=60}R[this.displayfield].formatString=this.cellsformat;R[this.displayfield].localization=a.gridlocalization;R[this.displayfield].type=g;R[this.displayfield].cellsAlign=this.cellsalign;R[this.displayfield].hidden=!ac;R[this.displayfield].displayfield=this.displayfield;j.push(R[this.displayfield])}ak="cell"+am;var c=b(this.element);if(this.element==undefined){c=b(this.uielement)}if(!i){i=c}else{if(!m._rendered){c=i;d=aq;e=ar;var h=a.toTP("jqx-grid-cell")+" "+a.toTP("jqx-item");d[0].className=h;h+=a.toTP("jqx-grid-cell-alt");if(e){e[0].className=h}}}O="column"+ao;if(Z=="html"||Z=="xls"||Z=="pdf"){var f=function(u,v,w,t,o,r,s,q,p){af[u]={};if(v==undefined){return}if(v[0].offsetWidth==0||v[0].offsetHeight==0){return}af[u]["font-size"]=v.css("font-size");af[u]["font-weight"]=v.css("font-weight");af[u]["font-style"]=v.css("font-style");af[u]["background-color"]=r._getexportcolor(v.css("background-color"));af[u]["color"]=r._getexportcolor(v.css("color"));af[u]["border-color"]=r._getexportcolor(v.css("border-top-color"));if(w){af[u]["text-align"]=o.align}else{af[u]["text-align"]=o.cellsalign;af[u]["formatString"]=o.cellsformat;af[u]["dataType"]=g}if(Z=="html"||Z=="pdf"){af[u]["border-top-width"]=v.css("border-top-width");af[u]["border-left-width"]=v.css("border-left-width");af[u]["border-right-width"]=v.css("border-right-width");af[u]["border-bottom-width"]=v.css("border-bottom-width");af[u]["border-top-style"]=v.css("border-top-style");af[u]["border-left-style"]=v.css("border-left-style");af[u]["border-right-style"]=v.css("border-right-style");af[u]["border-bottom-style"]=v.css("border-bottom-style");if(w){if(s==0){af[u]["border-left-width"]=v.css("border-right-width")}af[u]["border-top-width"]=v.css("border-right-width");af[u]["border-bottom-width"]=v.css("border-bottom-width")}else{if(s==0){af[u]["border-left-width"]=v.css("border-right-width")}}af[u]["height"]=v.css("height")}if(o.exportable&&(!o.hidden||M)){if(q==true){if(!R[o.displayfield].customCellStyles){R[o.displayfield].customCellStyles=new Array()}R[o.displayfield].customCellStyles[p]=u}else{if(w){R[o.displayfield].style=u}else{if(!t){R[o.displayfield].cellStyle=u}else{R[o.displayfield].cellAltStyle=u}}}}};f(O,c,true,false,this,a,l);ao++;f(ak,d,false,false,this,a,l);if(a.altrows){ak="cellalt"+am;f(ak,e,false,true,this,a,l)}if(this.customCellStyles){for(var n in m.customCellStyles){d.removeClass(m.customCellStyles[n])}for(var n in m.customCellStyles){d.addClass(m.customCellStyles[n]);f(ak+m.customCellStyles[n],d,false,false,this,a,l,true,n);d.removeClass(m.customCellStyles[n])}}am++}});b.each(this.columns.records,function(c){if(R[this.displayfield]){R[this.displayfield].columnsDataFields=j}});if(this.showaggregates){var S=[];var Y=Z=="xls"?"_AG":"";var ai=this.groupable?this.groups.length:0;if(this.rowdetails){ai++}if(this.selectionmode==="checkbox"){ai++}if(aj.length>0){b.each(this.columns.records,function(c){if(this.aggregates){for(var f=0;f0&&Z.columns.records[0].element?Z.columns.records[0].element:Z.host.find(".jqx-grid-header")[0]);var j=window.getComputedStyle(Z.host.find(".jqx-grid-header")[0]);var ad=Z.offsetWidth===0||Z.offsetHeight===0;if(!ad){var ae=function(h){var g="Helvetica";var e=h.fontSize;var m=h.borderRightColor;var f=h.backgroundColor;var k=h.color;var d=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");var l=function(n){return isNaN(n)?"00":d[(n-n%16)/16]+d[n%16]};var c=function(r){if(r.toString().indexOf("rgba")!=-1){var t=k.split(",");var p=parseInt(t[0].substring(5));var q=parseInt(t[1]);var u=parseInt(t[2]);var s=parseFloat(t[3].substring(1,4));var o={r:p,g:q,b:u};var n=Z._rgbToHex(o);if(p==0&&q==0&&u==0&&s==0){return"#ffffff"}return"#"+n}r=r.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!r){return"#ffffff"}return"#"+l(r[1])+l(r[2])+l(r[3]).toUpperCase()};return{borderColor:c(m),fontSize:e,fontFamily:g,color:c(k),backgroundColor:c(f)}};var T=ae(ac);var Y=ae(J);var O=ae(j);var a={height:"30px",border:"1px solid "+T.borderColor,fontFamily:O.fontFamily,fontSize:O.fontSize,color:O.color,backgroundColor:Y.backgroundColor,fontWeight:"400"};var ai={border:"1px solid "+T.borderColor,fontFamily:T.fontFamily,fontSize:T.fontSize};var Q={height:Z.rowsheight+"px"};for(var W=0;W1){var e=b(a.table[0].rows[1].cells[l]);if(!ar){ar=e}}if(!aq){aq=d}var m=this;var k=function(p){p.removeClass(a.toThemeProperty("jqx-grid-cell-selected"));p.removeClass(a.toThemeProperty("jqx-fill-state-pressed"));p.removeClass(a.toThemeProperty("jqx-grid-cell-hover"));p.removeClass(a.toThemeProperty("jqx-fill-state-hover"));if(m.customCellStyles){for(var o in m.customCellStyles){p.removeClass(m.customCellStyles[o])}}};k(d);if(e){k(e)}if(this.displayfield==null){return true}if(a.showaggregates){if(a.getcolumnaggregateddata){aj.push(a.getcolumnaggregateddata(this.displayfield,this.aggregates,true,ad))}}var g=a._getexportcolumntype(this);if(this.exportable&&(!this.hidden||M)){R[this.displayfield]={};R[this.displayfield].text=this.text;R[this.displayfield].width=parseInt(this.width);if(isNaN(R[this.displayfield].width)){R[this.displayfield].width=60}R[this.displayfield].formatString=this.cellsformat;R[this.displayfield].localization=a.gridlocalization;R[this.displayfield].type=g;R[this.displayfield].cellsAlign=this.cellsalign;R[this.displayfield].hidden=!ac;R[this.displayfield].displayfield=this.displayfield;j.push(R[this.displayfield])}ak="cell"+am;var c=b(this.element);if(this.element==undefined){c=b(this.uielement)}if(!i){i=c}else{if(!m._rendered){c=i;d=aq;e=ar;var h=a.toTP("jqx-grid-cell")+" "+a.toTP("jqx-item");d[0].className=h;h+=a.toTP("jqx-grid-cell-alt");if(e){e[0].className=h}}}O="column"+ao;if(Z=="html"||Z=="xls"||Z=="pdf"){var f=function(u,v,w,t,o,r,s,q,p){af[u]={};if(v==undefined){return}if(v[0].offsetWidth==0||v[0].offsetHeight==0){if(!w){af[u]["dataType"]=g}return}af[u]["font-size"]=v.css("font-size");af[u]["font-weight"]=v.css("font-weight");af[u]["font-style"]=v.css("font-style");af[u]["background-color"]=r._getexportcolor(v.css("background-color"));af[u]["color"]=r._getexportcolor(v.css("color"));af[u]["border-color"]=r._getexportcolor(v.css("border-top-color"));if(w){af[u]["text-align"]=o.align}else{af[u]["text-align"]=o.cellsalign;af[u]["formatString"]=o.cellsformat;af[u]["dataType"]=g}if(Z=="html"||Z=="pdf"){af[u]["border-top-width"]=v.css("border-top-width");af[u]["border-left-width"]=v.css("border-left-width");af[u]["border-right-width"]=v.css("border-right-width");af[u]["border-bottom-width"]=v.css("border-bottom-width");af[u]["border-top-style"]=v.css("border-top-style");af[u]["border-left-style"]=v.css("border-left-style");af[u]["border-right-style"]=v.css("border-right-style");af[u]["border-bottom-style"]=v.css("border-bottom-style");if(w){if(s==0){af[u]["border-left-width"]=v.css("border-right-width")}af[u]["border-top-width"]=v.css("border-right-width");af[u]["border-bottom-width"]=v.css("border-bottom-width")}else{if(s==0){af[u]["border-left-width"]=v.css("border-right-width")}}af[u]["height"]=v.css("height")}if(o.exportable&&(!o.hidden||M)){if(q==true){if(!R[o.displayfield].customCellStyles){R[o.displayfield].customCellStyles=new Array()}R[o.displayfield].customCellStyles[p]=u}else{if(w){R[o.displayfield].style=u}else{if(!t){R[o.displayfield].cellStyle=u}else{R[o.displayfield].cellAltStyle=u}}}}};f(O,c,true,false,this,a,l);ao++;f(ak,d,false,false,this,a,l);if(a.altrows){ak="cellalt"+am;f(ak,e,false,true,this,a,l)}if(this.customCellStyles){for(var n in m.customCellStyles){d.removeClass(m.customCellStyles[n])}for(var n in m.customCellStyles){d.addClass(m.customCellStyles[n]);f(ak+m.customCellStyles[n],d,false,false,this,a,l,true,n);d.removeClass(m.customCellStyles[n])}}am++}});b.each(this.columns.records,function(c){if(R[this.displayfield]){R[this.displayfield].columnsDataFields=j}});if(this.showaggregates){var S=[];var Y=Z=="xls"?"_AG":"";var ai=this.groupable?this.groups.length:0;if(this.rowdetails){ai++}if(this.selectionmode==="checkbox"){ai++}if(aj.length>0){b.each(this.columns.records,function(c){if(this.aggregates){for(var f=0;f