ru.coon 2.8.21 → 2.8.22

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # Version 2.8.22, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/abdcd052a504db9e3ef0d640c05c861dab6fc771)
2
+ * ## Features
3
+ * <span style='color:green'>feat: HT-10212: fix layout bug</span> ([cec2b3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cec2b36d2917ca56537c119f1ce1ead71c8ca009))
4
+ * <span style='color:green'>feat: HT-10463: fix add in context menu button</span> ([4588f7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4588f75ee55b80327192cb7df28770d41d4707c6))
5
+
6
+ * update: CHANGELOG.md ([866504], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/86650477e9606983c72620ed063150bb23fc3e4e))
7
+
1
8
  # Version 2.8.21, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dcc7c4b24a73690b18533027979c7ed0e3c88a78)
2
9
  * ## Features
3
10
  * <span style='color:green'>feat: BFL-16584: fix create plugin method</span> ([0b4aaf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0b4aafb76151f2a689fed079857e972fb9c34ebd))
@@ -7,6 +14,7 @@
7
14
  # Version 2.8.20, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c7acd5384ee23afce8f37cc9b5821c3837f5cf98)
8
15
  * ## Features
9
16
  * <span style='color:green'>feat: BFL-16584: fix create plugin method</span> ([36b867], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/36b8678a1bb336a50930d379219dc61ac5a06a97))
17
+ * <span style='color:green'>feat: Add itemId property with pluginId value on each toolbar item to auto generate testId. Related to HT-8881.</span> ([32f736], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/32f7362b2a2a090842dd56feadc5586a5188b037))
10
18
 
11
19
  * update: CHANGELOG.md ([7dcff7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7dcff78843efc4b137d3796aee2273bf65db0e53))
12
20
 
@@ -174,6 +182,8 @@ feat: HT-10458: Check then summery row has values</span> ([b87004], [link](http:
174
182
  * <span style='color:green'>feat: TR-67905 loginForm and TextFieldFormatter plugin</span> ([aafbfc], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aafbfc81b05aa91a172905b47bf7c620f720be11))
175
183
  * <span style='color:green'>feat: HT-10115: chain plugin return result, log unified buttons call handlers result</span> ([408dab], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/408dab15c6afc49e47bd80729bf55e1a541522cc))
176
184
  * <span style='color:green'>feat: [ReportTree][CharacteristicGridCopyPlugin] Added testId generation. Related to HT-8881.</span> ([2bc5e8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2bc5e899f6a5d390844fcc25fc4511b5d195fbb8))
185
+ * <span style='color:green'>feat: [ReportTree] Added generating of testId's on tree nodes. Related to HT-8881.</span> ([648ff1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/648ff18a85a4cdb3ca1a9953e08808b4c3a822ad))
186
+ * <span style='color:green'>feat: [CharacteristicGridCopyPlugin] Added property to enable generating of testId's on column widgets. Related to HT-8881.</span> ([aa03d7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aa03d72ab1592b7134d1d980f442a9901852424b))
177
187
 
178
188
  * ## Fixes
179
189
  * <span style='color:red'> TR-68748: set aceEditor value on render editor</span> ([0ec858], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ec858f3daaa04b6ae03ad6980b98e68795538f9))
package/dist/print.css ADDED
@@ -0,0 +1 @@
1
+ .printModal{font-family:sans-serif;display:flex;text-align:center;font-weight:300;font-size:30px;left:0;top:0;position:absolute;color:#045fb4;width:100%;height:100%;background-color:hsla(0,0%,100%,.9)}.printClose{position:absolute;right:10px;top:10px}.printClose:before{content:"×";font-family:Helvetica Neue,sans-serif;font-weight:100;line-height:1px;padding-top:.5em;display:block;font-size:2em;text-indent:1px;overflow:hidden;height:1.25em;width:1.25em;text-align:center;cursor:pointer}.printSpinner{margin-top:3px;margin-left:-40px;position:absolute;display:inline-block;width:25px;height:25px;border:2px solid #045fb4;border-radius:50%;animation:spin .75s linear infinite}.printSpinner:after,.printSpinner:before{left:-2px;top:-2px;display:none;position:absolute;content:"";width:inherit;height:inherit;border:inherit;border-radius:inherit}.printSpinner,.printSpinner:after,.printSpinner:before{display:inline-block;border-color:#045fb4 transparent transparent;animation-duration:1.2s}.printSpinner:before{transform:rotate(120deg)}.printSpinner:after{transform:rotate(240deg)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
package/dist/print.js ADDED
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.printJS=t():e.printJS=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(2)},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(1);var r={isFirefox:function(){return"undefined"!=typeof InstallTrigger},getFirefoxMajorVersion:function(e){var t=(e=e||navigator.userAgent).toLowerCase().match(/firefox\/(\S+)/);if(t)return t[1].split(".").map((function(e){return parseInt(e)}))[0]},isIE:function(){return-1!==navigator.userAgent.indexOf("MSIE")||!!document.documentMode},isEdge:function(){return!r.isIE()&&!!window.StyleMedia},isChrome:function(){return!!(arguments.length>0&&arguments[0]!==undefined?arguments[0]:window).chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||-1!==navigator.userAgent.toLowerCase().indexOf("safari")},isIOSChrome:function(){return-1!==navigator.userAgent.toLowerCase().indexOf("crios")}},o=r,i={show:function(e){var t=document.createElement("div");t.setAttribute("style","font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;"),t.setAttribute("id","printJS-Modal");var n=document.createElement("div");n.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),n.appendChild(r);var o=document.createElement("span");o.setAttribute("class","printSpinner"),n.appendChild(o);var a=document.createTextNode(e.modalMessage);n.appendChild(a),t.appendChild(n),document.getElementsByTagName("body")[0].appendChild(t),document.getElementById("printClose").addEventListener("click",(function(){i.close()}))},close:function(){var e=document.getElementById("printJS-Modal");e&&e.parentNode.removeChild(e)}},a=i;function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function c(e,t){for(var n=0;n<e.length;n++)if("object"===l(t)&&-1!==t.indexOf(e[n]))return!0;return!1}function s(e,t){var n=document.createElement("div");if(u(t.header))n.innerHTML=t.header;else{var r=document.createElement("h1"),o=document.createTextNode(t.header);r.appendChild(o),r.setAttribute("style",t.headerStyle),n.appendChild(r)}e.insertBefore(n,e.childNodes[0])}function f(e,t){var n=document.createElement("div");if(u(t.footer))n.innerHTML=t.footer;else{var r=document.createElement("h1"),o=document.createTextNode(t.footer);r.appendChild(o),r.setAttribute("style",t.footerStyle),n.appendChild(r)}e.insertBefore(n,e.childNodes.lastChild)}function p(e){e.showModal&&a.close(),e.onLoadingEnd&&e.onLoadingEnd(),(e.showModal||e.onLoadingStart)&&window.URL.revokeObjectURL(e.printable);var t="mouseover";(o.isChrome()||o.isFirefox())&&(t="focus");window.addEventListener(t,(function n(){window.removeEventListener(t,n),e.onPrintDialogClose();var r=document.getElementById(e.frameId);r&&(e.frameRemoveDelay?setTimeout((function(){r.remove()}),e.frameRemoveDelay):r.remove())}))}function u(e){return new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>").test(e)}function m(e,t){try{if(e.focus(),o.isEdge()||o.isIE())try{e.contentWindow.document.execCommand("print",!1,null)}catch(n){setTimeout((function(){e.contentWindow.print()}),1e3)}else setTimeout((function(){e.contentWindow.print()}),1e3)}catch(r){t.onError(r)}finally{o.isFirefox()&&o.getFirefoxMajorVersion()<110&&(e.style.visibility="hidden",e.style.left="-1px"),p(t)}}var b={send:function(e,t){document.getElementsByTagName("body")[0].appendChild(t);var n=document.getElementById(e.frameId);n.onload=function(){if("pdf"!==e.type){var t=n.contentWindow||n.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(e.printableElement),"pdf"!==e.type&&e.style){var r=document.createElement("style");r.innerHTML=e.style,t.head.appendChild(r)}var i=t.getElementsByTagName("img");i.length>0?function(e){var t=e.map((function(e){if(e.src&&e.src!==window.location.href)return function(e){return new Promise((function(t){(function n(){e&&"undefined"!=typeof e.naturalWidth&&0!==e.naturalWidth&&e.complete?t():setTimeout(n,500)})()}))}(e)}));return Promise.all(t)}(Array.from(i)).then((function(){return m(n,e)})):m(n,e)}else o.isFirefox()&&o.getFirefoxMajorVersion()<110?setTimeout((function(){return m(n,e)}),1e3):m(n,e)}}},y=function(e,t){if(e.base64){-1!==e.printable.indexOf(",")&&(e.printable=e.printable.split(",")[1]);var n=Uint8Array.from(atob(e.printable),(function(e){return e.charCodeAt(0)}));h(e,t,n)}else{e.printable=/^(blob|http|\/\/)/i.test(e.printable)?e.printable:window.location.origin+("/"!==e.printable.charAt(0)?"/"+e.printable:e.printable);var r=new window.XMLHttpRequest;r.responseType="arraybuffer",r.addEventListener("error",(function(){p(e),e.onError(r.statusText,r)})),r.addEventListener("load",(function(){if(-1===[200,201].indexOf(r.status))return p(e),void e.onError(r.statusText,r);h(e,t,r.response)})),r.open("GET",e.printable,!0),r.send()}};function h(e,t,n){var r=new window.Blob([n],{type:"application/pdf"});r=window.URL.createObjectURL(r),t.setAttribute("src",r),b.send(e,t)}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}var v=function(e,t){var n,r="object"===g(n=e.printable)&&n&&(n instanceof HTMLElement||1===n.nodeType)?e.printable:document.getElementById(e.printable);r?(e.printableElement=w(r,e),e.header&&s(e.printableElement,e),e.footer&&f(e.printableElement,e),b.send(e,t)):window.console.error("Invalid HTML element id: "+e.printable)};function w(e,t){for(var n=e.cloneNode(),r=Array.prototype.slice.call(e.childNodes),o=0;o<r.length;o++)if(-1===t.ignoreElements.indexOf(r[o].id)){var i=w(r[o],t);n.appendChild(i)}switch(t.scanStyles&&1===e.nodeType&&n.setAttribute("style",function(e,t){for(var n="",r=(document.defaultView||window).getComputedStyle(e,""),o=0;o<r.length;o++)(-1!==t.targetStyles.indexOf("*")||-1!==t.targetStyle.indexOf(r[o])||c(t.targetStyles,r[o]))&&r.getPropertyValue(r[o])&&(n+=r[o]+":"+r.getPropertyValue(r[o])+";");return n+"max-width: "+t.maxWidth+"px !important; font-size: "+t.font_size+" !important;"}(e,t)),e.tagName){case"SELECT":n.value=e.value;break;case"CANVAS":n.getContext("2d").drawImage(e,0,0)}return n}var E=function(e,t){e.printableElement=document.createElement("div"),e.printableElement.setAttribute("style","width:100%"),e.printableElement.innerHTML=e.printable,e.header&&s(e.printableElement,e),e.footer&&f(e.printableElement,e),b.send(e,t)},S=function(e,t){e.printable.constructor!==Array&&(e.printable=[e.printable]),e.printableElement=document.createElement("div"),e.printable.forEach((function(t){var n=document.createElement("img");if(n.setAttribute("style",e.imageStyle),n.src=t,o.isFirefox()){var r=n.src;n.src=r}var i=document.createElement("div");i.appendChild(n),e.printableElement.appendChild(i)})),e.header&&s(e.printableElement,e),e.footer&&f(e.printableElement,e),b.send(e,t)};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}var C=function(e,t){if("object"!==x(e.printable))throw new Error("Invalid javascript data object (JSON).");if("boolean"!=typeof e.repeatTableHeader)throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!e.properties||!Array.isArray(e.properties))throw new Error("Invalid properties array for your JSON data.");e.properties=e.properties.map((function(t){return{field:"object"===x(t)?t.field:t,displayName:"object"===x(t)?t.displayName:t,columnSize:"object"===x(t)&&t.columnSize?t.columnSize+";":100/e.properties.length+"%;"}})),e.printableElement=document.createElement("div"),e.header&&s(e.printableElement,e),e.printableElement.innerHTML+=function(e){var t=e.printable,n=e.properties,r='<table style="border-collapse: collapse; width: 100%;">';e.repeatTableHeader&&(r+="<thead>");r+="<tr>";for(var o=0;o<n.length;o++)r+='<th style="width:'+n[o].columnSize+";"+e.gridHeaderStyle+'">'+d(n[o].displayName)+"</th>";r+="</tr>",e.repeatTableHeader&&(r+="</thead>");r+="<tbody>";for(var i=0;i<t.length;i++){r+="<tr>";for(var a=0;a<n.length;a++){var l=t[i],c=n[a].field.split(".");if(c.length>1)for(var s=0;s<c.length;s++)l=l[c[s]];else l=l[n[a].field];r+='<td style="width:'+n[a].columnSize+e.gridStyle+'">'+l+"</td>"}r+="</tr>"}return r+="</tbody></table>"}(e),e.footer&&f(e.printableElement,e),b.send(e,t)};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}var A=["pdf","html","image","json","raw-html"],L=function(){var e={printable:null,fallbackPrintable:null,type:"pdf",header:null,headerStyle:"font-weight: 300;",footer:null,footerStyle:"font-weight: 300;",maxWidth:800,properties:null,gridHeaderStyle:"font-weight: bold; padding: 5px; border: 1px solid #dddddd;",gridStyle:"border: 1px solid lightgray; margin-bottom: -1px;",showModal:!1,onError:function(e){throw e},onLoadingStart:null,onLoadingEnd:null,onPrintDialogClose:function(){},onIncompatibleBrowser:function(){},modalMessage:"Retrieving Document...",frameId:"printJS",frameRemoveDelay:null,printableElement:null,documentTitle:"Document",targetStyle:["clear","display","width","min-width","height","min-height","max-height"],targetStyles:["border","box","break","text-decoration"],ignoreElements:[],repeatTableHeader:!0,css:null,style:null,scanStyles:!0,base64:!1,onPdfOpen:null,font:"TimesNewRoman",font_size:"12pt",honorMarginPadding:!0,honorColor:!1,imageStyle:"max-width: 100%;"},t=arguments[0];if(t===undefined)throw new Error("printJS expects at least 1 attribute.");switch(T(t)){case"string":e.printable=encodeURI(t),e.fallbackPrintable=e.printable,e.type=arguments[1]||e.type;break;case"object":for(var n in e.printable=t.printable,e.fallbackPrintable="undefined"!=typeof t.fallbackPrintable?t.fallbackPrintable:e.printable,e.fallbackPrintable=e.base64?"data:application/pdf;base64,".concat(e.fallbackPrintable):e.fallbackPrintable,e)"printable"!==n&&"fallbackPrintable"!==n&&(e[n]="undefined"!=typeof t[n]?t[n]:e[n]);break;default:throw new Error('Unexpected argument type! Expected "string" or "object", got '+T(t))}if(!e.printable)throw new Error("Missing printable information.");if(!e.type||"string"!=typeof e.type||-1===A.indexOf(e.type.toLowerCase()))throw new Error("Invalid print type. Available types are: pdf, html, image and json.");e.showModal&&a.show(e),e.onLoadingStart&&e.onLoadingStart();var r=document.getElementById(e.frameId);r&&r.parentNode.removeChild(r);var i=document.createElement("iframe");switch(o.isFirefox()?i.setAttribute("style","width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0"):i.setAttribute("style","visibility: hidden; height: 0; width: 0; position: absolute; border: 0"),i.setAttribute("id",e.frameId),"pdf"!==e.type&&(i.srcdoc="<html><head><title>"+e.documentTitle+"</title>",e.css&&(Array.isArray(e.css)||(e.css=[e.css]),e.css.forEach((function(e){i.srcdoc+='<link rel="stylesheet" href="'+e+'">'}))),i.srcdoc+="</head><body></body></html>"),e.type){case"pdf":if(o.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer."),window.open(e.fallbackPrintable,"_blank").focus(),e.onIncompatibleBrowser()}catch(l){e.onError(l)}finally{e.showModal&&a.close(),e.onLoadingEnd&&e.onLoadingEnd()}else y(e,i);break;case"image":S(e,i);break;case"html":v(e,i);break;case"raw-html":E(e,i);break;case"json":C(e,i)}},j=L;"undefined"!=typeof window&&(window.printJS=j);t["default"]=j}])["default"]}));
2
+ //# sourceMappingURL=print.map
package/dist/print.map ADDED
@@ -0,0 +1,294 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [
4
+ "webpack://printJS/webpack/universalModuleDefinition",
5
+ "webpack://printJS/webpack/bootstrap",
6
+ "webpack://printJS/./src/js/browser.js",
7
+ "webpack://printJS/./src/js/modal.js",
8
+ "webpack://printJS/./src/js/functions.js",
9
+ "webpack://printJS/./src/js/print.js",
10
+ "webpack://printJS/./src/js/pdf.js",
11
+ "webpack://printJS/./src/js/html.js",
12
+ "webpack://printJS/./src/js/raw-html.js",
13
+ "webpack://printJS/./src/js/image.js",
14
+ "webpack://printJS/./src/js/json.js",
15
+ "webpack://printJS/./src/js/init.js",
16
+ "webpack://printJS/./src/index.js"
17
+ ],
18
+ "names": [
19
+ "root",
20
+ "factory",
21
+ "exports",
22
+ "module",
23
+ "define",
24
+ "amd",
25
+ "window",
26
+ "installedModules",
27
+ "__webpack_require__",
28
+ "moduleId",
29
+ "i",
30
+ "l",
31
+ "modules",
32
+ "call",
33
+ "m",
34
+ "c",
35
+ "d",
36
+ "name",
37
+ "getter",
38
+ "o",
39
+ "Object",
40
+ "defineProperty",
41
+ "enumerable",
42
+ "get",
43
+ "r",
44
+ "Symbol",
45
+ "toStringTag",
46
+ "value",
47
+ "t",
48
+ "mode",
49
+ "__esModule",
50
+ "ns",
51
+ "create",
52
+ "key",
53
+ "bind",
54
+ "n",
55
+ "object",
56
+ "property",
57
+ "prototype",
58
+ "hasOwnProperty",
59
+ "p",
60
+ "s",
61
+ "Browser",
62
+ "isFirefox",
63
+ "InstallTrigger",
64
+ "getFirefoxMajorVersion",
65
+ "userAgent",
66
+ "match",
67
+ "navigator",
68
+ "toLowerCase",
69
+ "split",
70
+ "map",
71
+ "x",
72
+ "parseInt",
73
+ "isIE",
74
+ "indexOf",
75
+ "document",
76
+ "documentMode",
77
+ "isEdge",
78
+ "StyleMedia",
79
+ "isChrome",
80
+ "arguments",
81
+ "length",
82
+ "undefined",
83
+ "chrome",
84
+ "isSafari",
85
+ "toString",
86
+ "HTMLElement",
87
+ "isIOSChrome",
88
+ "Modal",
89
+ "show",
90
+ "params",
91
+ "printModal",
92
+ "createElement",
93
+ "setAttribute",
94
+ "contentDiv",
95
+ "closeButton",
96
+ "appendChild",
97
+ "spinner",
98
+ "messageNode",
99
+ "createTextNode",
100
+ "modalMessage",
101
+ "getElementsByTagName",
102
+ "getElementById",
103
+ "addEventListener",
104
+ "close",
105
+ "parentNode",
106
+ "removeChild",
107
+ "capitalizePrint",
108
+ "obj",
109
+ "charAt",
110
+ "toUpperCase",
111
+ "slice",
112
+ "targetStylesMatch",
113
+ "styles",
114
+ "_typeof",
115
+ "addHeader",
116
+ "printElement",
117
+ "headerContainer",
118
+ "isRawHTML",
119
+ "header",
120
+ "innerHTML",
121
+ "headerElement",
122
+ "headerNode",
123
+ "headerStyle",
124
+ "insertBefore",
125
+ "childNodes",
126
+ "addFooter",
127
+ "footerContainer",
128
+ "footer",
129
+ "footerElement",
130
+ "footerNode",
131
+ "footerStyle",
132
+ "lastChild",
133
+ "cleanUp",
134
+ "showModal",
135
+ "onLoadingEnd",
136
+ "onLoadingStart",
137
+ "URL",
138
+ "revokeObjectURL",
139
+ "printable",
140
+ "event",
141
+ "handler",
142
+ "removeEventListener",
143
+ "onPrintDialogClose",
144
+ "iframe",
145
+ "frameId",
146
+ "frameRemoveDelay",
147
+ "setTimeout",
148
+ "remove",
149
+ "raw",
150
+ "RegExp",
151
+ "test",
152
+ "performPrint",
153
+ "iframeElement",
154
+ "focus",
155
+ "contentWindow",
156
+ "execCommand",
157
+ "e",
158
+ "print",
159
+ "error",
160
+ "onError",
161
+ "style",
162
+ "visibility",
163
+ "left",
164
+ "Print",
165
+ "send",
166
+ "printFrame",
167
+ "onload",
168
+ "type",
169
+ "printDocument",
170
+ "contentDocument",
171
+ "body",
172
+ "printableElement",
173
+ "head",
174
+ "images",
175
+ "promises",
176
+ "image",
177
+ "src",
178
+ "location",
179
+ "href",
180
+ "Promise",
181
+ "resolve",
182
+ "pollImage",
183
+ "naturalWidth",
184
+ "complete",
185
+ "loadIframeImage",
186
+ "all",
187
+ "loadIframeImages",
188
+ "Array",
189
+ "from",
190
+ "then",
191
+ "base64",
192
+ "bytesArray",
193
+ "Uint8Array",
194
+ "atob",
195
+ "charCodeAt",
196
+ "createBlobAndPrint",
197
+ "origin",
198
+ "req",
199
+ "XMLHttpRequest",
200
+ "responseType",
201
+ "statusText",
202
+ "status",
203
+ "response",
204
+ "open",
205
+ "data",
206
+ "localPdf",
207
+ "Blob",
208
+ "createObjectURL",
209
+ "nodeType",
210
+ "cloneElement",
211
+ "console",
212
+ "element",
213
+ "clone",
214
+ "cloneNode",
215
+ "childNodesArray",
216
+ "ignoreElements",
217
+ "id",
218
+ "clonedChild",
219
+ "scanStyles",
220
+ "elementStyle",
221
+ "defaultView",
222
+ "getComputedStyle",
223
+ "targetStyles",
224
+ "targetStyle",
225
+ "getPropertyValue",
226
+ "maxWidth",
227
+ "font_size",
228
+ "collectStyles",
229
+ "tagName",
230
+ "getContext",
231
+ "drawImage",
232
+ "constructor",
233
+ "forEach",
234
+ "img",
235
+ "imageStyle",
236
+ "fullyQualifiedSrc",
237
+ "imageWrapper",
238
+ "Error",
239
+ "repeatTableHeader",
240
+ "properties",
241
+ "isArray",
242
+ "field",
243
+ "displayName",
244
+ "columnSize",
245
+ "htmlData",
246
+ "a",
247
+ "gridHeaderStyle",
248
+ "stringData",
249
+ "gridStyle",
250
+ "jsonToHTML",
251
+ "iterator",
252
+ "printTypes",
253
+ "fallbackPrintable",
254
+ "onIncompatibleBrowser",
255
+ "documentTitle",
256
+ "css",
257
+ "onPdfOpen",
258
+ "font",
259
+ "honorMarginPadding",
260
+ "honorColor",
261
+ "args",
262
+ "encodeURI",
263
+ "k",
264
+ "concat",
265
+ "usedFrame",
266
+ "srcdoc",
267
+ "file",
268
+ "info",
269
+ "Pdf",
270
+ "Image",
271
+ "Html",
272
+ "RawHtml",
273
+ "Json",
274
+ "printJS"
275
+ ],
276
+ "mappings": "CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,GACnB,CATD,CASGK,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GAC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AAI3G,EAAQY,OACV,IACE0I,QAAQyD,KAAK,+DACDnP,OAAOmL,KAAKlH,EAAOmK,kBAAmB,UAC9CnG,QACJhE,EAAOoK,uBACT,CAAE,MAAO/F,GACPrE,EAAOsE,QAAQD,EACjB,CAAE,QAEIrE,EAAO4C,WAAW9C,EAAMgB,QACxBd,EAAO6C,cAAc7C,EAAO6C,cAClC,MAEAsI,EAAUnL,EAAQ4E,GAEpB,MACF,IAAK,QACHwG,EAAYpL,EAAQ4E,GACpB,MACF,IAAK,OACHyG,EAAWrL,EAAQ4E,GACnB,MACF,IAAK,WACH0G,EAActL,EAAQ4E,GACtB,MACF,IAAK,OACH2G,EAAWvL,EAAQ4E,GAGzB,ECtKI4G,EAAUpH,EAEM,oBAAXrI,SACTA,OAAOyP,QAAUA,GAGJA,c",
277
+ "file": "print.js",
278
+ "sourcesContent": [
279
+ "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"printJS\"] = factory();\n\telse\n\t\troot[\"printJS\"] = factory();\n})(window, function() {\nreturn ",
280
+ " \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n",
281
+ "const Browser = {\n // Firefox 1.0+\n isFirefox: () => {\n return typeof InstallTrigger !== 'undefined'\n },\n getFirefoxMajorVersion: (userAgent) => {\n userAgent = userAgent || navigator.userAgent\n const firefoxVersionRegex = /firefox\\/(\\S+)/\n const match = userAgent.toLowerCase().match(firefoxVersionRegex)\n if (match) {\n return match[1].split('.').map(x => parseInt(x))[0]\n }\n },\n // Internet Explorer 6-11\n isIE: () => {\n return navigator.userAgent.indexOf('MSIE') !== -1 || !!document.documentMode\n },\n // Edge 20+\n isEdge: () => {\n return !Browser.isIE() && !!window.StyleMedia\n },\n // Chrome 1+\n isChrome: (context = window) => {\n return !!context.chrome\n },\n // At least Safari 3+: \"[object HTMLElementConstructor]\"\n isSafari: () => {\n return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 ||\n navigator.userAgent.toLowerCase().indexOf('safari') !== -1\n },\n // IOS Chrome\n isIOSChrome: () => {\n return navigator.userAgent.toLowerCase().indexOf('crios') !== -1\n }\n}\n\nexport default Browser\n",
282
+ "const Modal = {\n show (params) {\n // Build modal\n const modalStyle = 'font-family:sans-serif; ' +\n 'display:table; ' +\n 'text-align:center; ' +\n 'font-weight:300; ' +\n 'font-size:30px; ' +\n 'left:0; top:0;' +\n 'position:fixed; ' +\n 'z-index: 9990;' +\n 'color: #0460B5; ' +\n 'width: 100%; ' +\n 'height: 100%; ' +\n 'background-color:rgba(255,255,255,.9);' +\n 'transition: opacity .3s ease;'\n\n // Create wrapper\n const printModal = document.createElement('div')\n printModal.setAttribute('style', modalStyle)\n printModal.setAttribute('id', 'printJS-Modal')\n\n // Create content div\n const contentDiv = document.createElement('div')\n contentDiv.setAttribute('style', 'display:table-cell; vertical-align:middle; padding-bottom:100px;')\n\n // Add close button (requires print.css)\n const closeButton = document.createElement('div')\n closeButton.setAttribute('class', 'printClose')\n closeButton.setAttribute('id', 'printClose')\n contentDiv.appendChild(closeButton)\n\n // Add spinner (requires print.css)\n const spinner = document.createElement('span')\n spinner.setAttribute('class', 'printSpinner')\n contentDiv.appendChild(spinner)\n\n // Add message\n const messageNode = document.createTextNode(params.modalMessage)\n contentDiv.appendChild(messageNode)\n\n // Add contentDiv to printModal\n printModal.appendChild(contentDiv)\n\n // Append print modal element to document body\n document.getElementsByTagName('body')[0].appendChild(printModal)\n\n // Add event listener to close button\n document.getElementById('printClose').addEventListener('click', function () {\n Modal.close()\n })\n },\n close () {\n const printModal = document.getElementById('printJS-Modal')\n\n if (printModal) {\n printModal.parentNode.removeChild(printModal)\n }\n }\n}\n\nexport default Modal\n",
283
+ "import Modal from './modal'\nimport Browser from './browser'\n\nexport function addWrapper (htmlData, params) {\n const bodyStyle = 'font-family:' + params.font + ' !important; font-size: ' + params.font_size + ' !important; width:100%;'\n return '<div style=\"' + bodyStyle + '\">' + htmlData + '</div>'\n}\n\nexport function capitalizePrint (obj) {\n return obj.charAt(0).toUpperCase() + obj.slice(1)\n}\n\nexport function collectStyles (element, params) {\n const win = document.defaultView || window\n\n // String variable to hold styling for each element\n let elementStyle = ''\n\n // Loop over computed styles\n const styles = win.getComputedStyle(element, '')\n\n for (let key = 0; key < styles.length; key++) {\n // Check if style should be processed\n if (params.targetStyles.indexOf('*') !== -1 || params.targetStyle.indexOf(styles[key]) !== -1 || targetStylesMatch(params.targetStyles, styles[key])) {\n if (styles.getPropertyValue(styles[key])) elementStyle += styles[key] + ':' + styles.getPropertyValue(styles[key]) + ';'\n }\n }\n\n // Print friendly defaults (deprecated)\n elementStyle += 'max-width: ' + params.maxWidth + 'px !important; font-size: ' + params.font_size + ' !important;'\n\n return elementStyle\n}\n\nfunction targetStylesMatch (styles, value) {\n for (let i = 0; i < styles.length; i++) {\n if (typeof value === 'object' && value.indexOf(styles[i]) !== -1) return true\n }\n return false\n}\n\nexport function addHeader (printElement, params) {\n // Create the header container div\n const headerContainer = document.createElement('div')\n\n // Check if the header is text or raw html\n if (isRawHTML(params.header)) {\n headerContainer.innerHTML = params.header\n } else {\n // Create header element\n const headerElement = document.createElement('h1')\n\n // Create header text node\n const headerNode = document.createTextNode(params.header)\n\n // Build and style\n headerElement.appendChild(headerNode)\n headerElement.setAttribute('style', params.headerStyle)\n headerContainer.appendChild(headerElement)\n }\n\n printElement.insertBefore(headerContainer, printElement.childNodes[0])\n}\n\nexport function addFooter (printElement, params) {\n // Create the footer container div\n let footerContainer = document.createElement('div')\n\n // Check if the footer is text or raw html\n if (isRawHTML(params.footer)) {\n footerContainer.innerHTML = params.footer\n } else {\n // Create footer element\n let footerElement = document.createElement('h1')\n\n // Create footer text node\n let footerNode = document.createTextNode(params.footer)\n\n // Build and style\n footerElement.appendChild(footerNode)\n footerElement.setAttribute('style', params.footerStyle)\n footerContainer.appendChild(footerElement)\n }\n\n printElement.insertBefore(footerContainer, printElement.childNodes.lastChild)\n}\n\nexport function cleanUp (params) {\n // If we are showing a feedback message to user, remove it\n if (params.showModal) Modal.close()\n\n // Check for a finished loading hook function\n if (params.onLoadingEnd) params.onLoadingEnd()\n\n // If preloading pdf files, clean blob url\n if (params.showModal || params.onLoadingStart) window.URL.revokeObjectURL(params.printable)\n\n // Run onPrintDialogClose callback\n let event = 'mouseover'\n\n if (Browser.isChrome() || Browser.isFirefox()) {\n // Ps.: Firefox will require an extra click in the document to fire the focus event.\n event = 'focus'\n }\n\n const handler = () => {\n // Make sure the event only happens once.\n window.removeEventListener(event, handler)\n\n params.onPrintDialogClose()\n\n // Remove iframe from the DOM\n const iframe = document.getElementById(params.frameId)\n\n if (iframe) {\n if (params.frameRemoveDelay) {\n setTimeout(() => {\n iframe.remove()\n },\n params.frameRemoveDelay\n )\n } else {\n iframe.remove()\n }\n }\n }\n\n window.addEventListener(event, handler)\n}\n\nexport function isRawHTML (raw) {\n const regexHtml = new RegExp('<([A-Za-z][A-Za-z0-9]*)\\\\b[^>]*>(.*?)</\\\\1>')\n return regexHtml.test(raw)\n}\n",
284
+ "import Browser from './browser'\nimport { cleanUp } from './functions'\n\nconst Print = {\n send: (params, printFrame) => {\n // Append iframe element to document body\n document.getElementsByTagName('body')[0].appendChild(printFrame)\n\n // Get iframe element\n const iframeElement = document.getElementById(params.frameId)\n\n // Wait for iframe to load all content\n iframeElement.onload = () => {\n if (params.type === 'pdf') {\n // Add a delay for Firefox. In my tests, 1000ms was sufficient but 100ms was not\n if (Browser.isFirefox() && Browser.getFirefoxMajorVersion() < 110) {\n setTimeout(() => performPrint(iframeElement, params), 1000)\n } else {\n performPrint(iframeElement, params)\n }\n return\n }\n\n // Get iframe element document\n let printDocument = (iframeElement.contentWindow || iframeElement.contentDocument)\n if (printDocument.document) printDocument = printDocument.document\n\n // Append printable element to the iframe body\n printDocument.body.appendChild(params.printableElement)\n\n // Add custom style\n if (params.type !== 'pdf' && params.style) {\n // Create style element\n const style = document.createElement('style')\n style.innerHTML = params.style\n\n // Append style element to iframe's head\n printDocument.head.appendChild(style)\n }\n\n // If printing images, wait for them to load inside the iframe\n const images = printDocument.getElementsByTagName('img')\n\n if (images.length > 0) {\n loadIframeImages(Array.from(images)).then(() => performPrint(iframeElement, params))\n } else {\n performPrint(iframeElement, params)\n }\n }\n }\n}\n\nfunction performPrint (iframeElement, params) {\n try {\n iframeElement.focus()\n\n // If Edge or IE, try catch with execCommand\n if (Browser.isEdge() || Browser.isIE()) {\n try {\n iframeElement.contentWindow.document.execCommand('print', false, null)\n } catch (e) {\n setTimeout(function(){\n iframeElement.contentWindow.print()\n },1000)\n }\n } else {\n // Other browsers\n setTimeout(function(){\n iframeElement.contentWindow.print()\n },1000)\n }\n } catch (error) {\n params.onError(error)\n } finally {\n if (Browser.isFirefox() && Browser.getFirefoxMajorVersion() < 110) {\n // Move the iframe element off-screen and make it invisible\n iframeElement.style.visibility = 'hidden'\n iframeElement.style.left = '-1px'\n }\n\n cleanUp(params)\n }\n}\n\nfunction loadIframeImages (images) {\n const promises = images.map(image => {\n if (image.src && image.src !== window.location.href) {\n return loadIframeImage(image)\n }\n })\n\n return Promise.all(promises)\n}\n\nfunction loadIframeImage (image) {\n return new Promise(resolve => {\n const pollImage = () => {\n !image || typeof image.naturalWidth === 'undefined' || image.naturalWidth === 0 || !image.complete\n ? setTimeout(pollImage, 500)\n : resolve()\n }\n pollImage()\n })\n}\n\nexport default Print\n",
285
+ "import Print from './print'\nimport { cleanUp } from './functions'\n\nexport default {\n print: (params, printFrame) => {\n // Check if we have base64 data\n if (params.base64) {\n if (params.printable.indexOf(',') !== -1) {\n //If pdf base64 start with `data:application/pdf;base64,`,Excute the atob function will throw an error.So we get the content after `,`\n params.printable = params.printable.split(',')[1];\n }\n const bytesArray = Uint8Array.from(atob(params.printable), c => c.charCodeAt(0))\n createBlobAndPrint(params, printFrame, bytesArray)\n return\n }\n\n // Format pdf url\n params.printable = /^(blob|http|\\/\\/)/i.test(params.printable)\n ? params.printable\n : window.location.origin + (params.printable.charAt(0) !== '/' ? '/' + params.printable : params.printable)\n\n // Get the file through a http request (Preload)\n const req = new window.XMLHttpRequest()\n req.responseType = 'arraybuffer'\n\n req.addEventListener('error', () => {\n cleanUp(params)\n params.onError(req.statusText, req)\n\n // Since we don't have a pdf document available, we will stop the print job\n })\n\n req.addEventListener('load', () => {\n // Check for errors\n if ([200, 201].indexOf(req.status) === -1) {\n cleanUp(params)\n params.onError(req.statusText, req)\n\n // Since we don't have a pdf document available, we will stop the print job\n return\n }\n\n // Print requested document\n createBlobAndPrint(params, printFrame, req.response)\n })\n\n req.open('GET', params.printable, true)\n req.send()\n }\n}\n\nfunction createBlobAndPrint (params, printFrame, data) {\n // Pass response or base64 data to a blob and create a local object url\n let localPdf = new window.Blob([data], { type: 'application/pdf' })\n localPdf = window.URL.createObjectURL(localPdf)\n\n // Set iframe src with pdf document url\n printFrame.setAttribute('src', localPdf)\n\n Print.send(params, printFrame)\n}\n",
286
+ "import { collectStyles, addHeader, addFooter } from './functions'\nimport Print from './print'\n\nexport default {\n print: (params, printFrame) => {\n // Get the DOM printable element\n const printElement = isHtmlElement(params.printable) ? params.printable : document.getElementById(params.printable)\n\n // Check if the element exists\n if (!printElement) {\n window.console.error('Invalid HTML element id: ' + params.printable)\n return\n }\n\n // Clone the target element including its children (if available)\n params.printableElement = cloneElement(printElement, params)\n\n // Add header\n if (params.header) {\n addHeader(params.printableElement, params)\n }\n\n // Add footer\n if (params.footer) {\n addFooter(params.printableElement, params)\n }\n\n // Print html element contents\n Print.send(params, printFrame)\n }\n}\n\nfunction cloneElement (element, params) {\n // Clone the main node (if not already inside the recursion process)\n const clone = element.cloneNode()\n\n // Loop over and process the children elements / nodes (including text nodes)\n const childNodesArray = Array.prototype.slice.call(element.childNodes)\n for (let i = 0; i < childNodesArray.length; i++) {\n // Check if we are skipping the current element\n if (params.ignoreElements.indexOf(childNodesArray[i].id) !== -1) {\n continue\n }\n\n // Clone the child element\n const clonedChild = cloneElement(childNodesArray[i], params)\n\n // Attach the cloned child to the cloned parent node\n clone.appendChild(clonedChild)\n }\n\n // Get all styling for print element (for nodes of type element only)\n if (params.scanStyles && element.nodeType === 1) {\n clone.setAttribute('style', collectStyles(element, params))\n }\n\n // Check if the element needs any state processing (copy user input data)\n switch (element.tagName) {\n case 'SELECT':\n // Copy the current selection value to its clone\n clone.value = element.value\n break\n case 'CANVAS':\n // Copy the canvas content to its clone\n clone.getContext('2d').drawImage(element, 0, 0)\n break\n }\n\n return clone\n}\n\nfunction isHtmlElement (printable) {\n // Check if element is instance of HTMLElement or has nodeType === 1 (for elements in iframe)\n return typeof printable === 'object' && printable && (printable instanceof HTMLElement || printable.nodeType === 1)\n}\n",
287
+ "import Print from './print'\nimport { addHeader, addFooter } from './functions'\n\nexport default {\n print: (params, printFrame) => {\n // Create printable element (container)\n params.printableElement = document.createElement('div')\n params.printableElement.setAttribute('style', 'width:100%')\n\n // Set our raw html as the printable element inner html content\n params.printableElement.innerHTML = params.printable\n\n // Add header\n if (params.header) {\n addHeader(params.printableElement, params)\n }\n\n // Add footer\n if (params.footer) {\n addFooter(params.printableElement, params)\n }\n\n // Print html contents\n Print.send(params, printFrame)\n }\n}\n",
288
+ "import { addHeader, addFooter } from './functions'\nimport Print from './print'\nimport Browser from './browser'\n\nexport default {\n print: (params, printFrame) => {\n // Check if we are printing one image or multiple images\n if (params.printable.constructor !== Array) {\n // Create array with one image\n params.printable = [params.printable]\n }\n\n // Create printable element (container)\n params.printableElement = document.createElement('div')\n\n // Create all image elements and append them to the printable container\n params.printable.forEach(src => {\n // Create the image element\n const img = document.createElement('img')\n img.setAttribute('style', params.imageStyle)\n\n // Set image src with the file url\n img.src = src\n\n // The following block is for Firefox, which for some reason requires the image's src to be fully qualified in\n // order to print it\n if (Browser.isFirefox()) {\n const fullyQualifiedSrc = img.src\n img.src = fullyQualifiedSrc\n }\n\n // Create the image wrapper\n const imageWrapper = document.createElement('div')\n\n // Append image to the wrapper element\n imageWrapper.appendChild(img)\n\n // Append wrapper to the printable element\n params.printableElement.appendChild(imageWrapper)\n })\n\n // Check if we are adding a print header\n if (params.header) addHeader(params.printableElement, params)\n\n // Check if we are adding a print footer\n if (params.footer) {\n addFooter(params.printableElement, params)\n }\n\n // Print image\n Print.send(params, printFrame)\n }\n}\n",
289
+ "import { capitalizePrint, addHeader, addFooter } from './functions'\nimport Print from './print'\n\nexport default {\n print: (params, printFrame) => {\n // Check if we received proper data\n if (typeof params.printable !== 'object') {\n throw new Error('Invalid javascript data object (JSON).')\n }\n\n // Validate repeatTableHeader\n if (typeof params.repeatTableHeader !== 'boolean') {\n throw new Error('Invalid value for repeatTableHeader attribute (JSON).')\n }\n\n // Validate properties\n if (!params.properties || !Array.isArray(params.properties)) {\n throw new Error('Invalid properties array for your JSON data.')\n }\n\n // We will format the property objects to keep the JSON api compatible with older releases\n params.properties = params.properties.map(property => {\n return {\n field: typeof property === 'object' ? property.field : property,\n displayName: typeof property === 'object' ? property.displayName : property,\n columnSize: typeof property === 'object' && property.columnSize ? property.columnSize + ';' : 100 / params.properties.length + '%;'\n }\n })\n\n // Create a print container element\n params.printableElement = document.createElement('div')\n\n // Check if we are adding a print header\n if (params.header) {\n addHeader(params.printableElement, params)\n }\n\n // Build the printable html data\n params.printableElement.innerHTML += jsonToHTML(params)\n\n // Check if we are adding a print footer\n if (params.footer) {\n addFooter(params.printableElement, params)\n }\n\n // Print the json data\n Print.send(params, printFrame)\n }\n}\n\nfunction jsonToHTML (params) {\n // Get the row and column data\n const data = params.printable\n const properties = params.properties\n\n // Create a html table\n let htmlData = '<table style=\"border-collapse: collapse; width: 100%;\">'\n\n // Check if the header should be repeated\n if (params.repeatTableHeader) {\n htmlData += '<thead>'\n }\n\n // Add the table header row\n htmlData += '<tr>'\n\n // Add the table header columns\n for (let a = 0; a < properties.length; a++) {\n htmlData += '<th style=\"width:' + properties[a].columnSize + ';' + params.gridHeaderStyle + '\">' + capitalizePrint(properties[a].displayName) + '</th>'\n }\n\n // Add the closing tag for the table header row\n htmlData += '</tr>'\n\n // If the table header is marked as repeated, add the closing tag\n if (params.repeatTableHeader) {\n htmlData += '</thead>'\n }\n\n // Create the table body\n htmlData += '<tbody>'\n\n // Add the table data rows\n for (let i = 0; i < data.length; i++) {\n // Add the row starting tag\n htmlData += '<tr>'\n\n // Print selected properties only\n for (let n = 0; n < properties.length; n++) {\n let stringData = data[i]\n\n // Support nested objects\n const property = properties[n].field.split('.')\n if (property.length > 1) {\n for (let p = 0; p < property.length; p++) {\n stringData = stringData[property[p]]\n }\n } else {\n stringData = stringData[properties[n].field]\n }\n\n // Add the row contents and styles\n htmlData += '<td style=\"width:' + properties[n].columnSize + params.gridStyle + '\">' + stringData + '</td>'\n }\n\n // Add the row closing tag\n htmlData += '</tr>'\n }\n\n // Add the table and body closing tags\n htmlData += '</tbody></table>'\n\n return htmlData\n}\n",
290
+ "'use strict'\n\nimport Browser from './browser'\nimport Modal from './modal'\nimport Pdf from './pdf'\nimport Html from './html'\nimport RawHtml from './raw-html'\nimport Image from './image'\nimport Json from './json'\n\nconst printTypes = ['pdf', 'html', 'image', 'json', 'raw-html']\n\nexport default {\n init () {\n const params = {\n printable: null,\n fallbackPrintable: null,\n type: 'pdf',\n header: null,\n headerStyle: 'font-weight: 300;',\n footer: null,\n footerStyle: 'font-weight: 300;',\n maxWidth: 800,\n properties: null,\n gridHeaderStyle: 'font-weight: bold; padding: 5px; border: 1px solid #dddddd;',\n gridStyle: 'border: 1px solid lightgray; margin-bottom: -1px;',\n showModal: false,\n onError: (error) => { throw error },\n onLoadingStart: null,\n onLoadingEnd: null,\n onPrintDialogClose: () => {},\n onIncompatibleBrowser: () => {},\n modalMessage: 'Retrieving Document...',\n frameId: 'printJS',\n frameRemoveDelay: null,\n printableElement: null,\n documentTitle: 'Document',\n targetStyle: ['clear', 'display', 'width', 'min-width', 'height', 'min-height', 'max-height'],\n targetStyles: ['border', 'box', 'break', 'text-decoration'],\n ignoreElements: [],\n repeatTableHeader: true,\n css: null,\n style: null,\n scanStyles: true,\n base64: false,\n\n // Deprecated\n onPdfOpen: null,\n font: 'TimesNewRoman',\n font_size: '12pt',\n honorMarginPadding: true,\n honorColor: false,\n imageStyle: 'max-width: 100%;'\n }\n\n // Check if a printable document or object was supplied\n const args = arguments[0]\n if (args === undefined) {\n throw new Error('printJS expects at least 1 attribute.')\n }\n\n // Process parameters\n switch (typeof args) {\n case 'string':\n params.printable = encodeURI(args)\n params.fallbackPrintable = params.printable\n params.type = arguments[1] || params.type\n break\n case 'object':\n params.printable = args.printable\n params.fallbackPrintable = typeof args.fallbackPrintable !== 'undefined' ? args.fallbackPrintable : params.printable\n params.fallbackPrintable = params.base64 ? `data:application/pdf;base64,${params.fallbackPrintable}` : params.fallbackPrintable\n for (var k in params) {\n if (k === 'printable' || k === 'fallbackPrintable') continue\n\n params[k] = typeof args[k] !== 'undefined' ? args[k] : params[k]\n }\n break\n default:\n throw new Error('Unexpected argument type! Expected \"string\" or \"object\", got ' + typeof args)\n }\n\n // Validate printable\n if (!params.printable) throw new Error('Missing printable information.')\n\n // Validate type\n if (!params.type || typeof params.type !== 'string' || printTypes.indexOf(params.type.toLowerCase()) === -1) {\n throw new Error('Invalid print type. Available types are: pdf, html, image and json.')\n }\n\n // Check if we are showing a feedback message to the user (useful for large files)\n if (params.showModal) Modal.show(params)\n\n // Check for a print start hook function\n if (params.onLoadingStart) params.onLoadingStart()\n\n // To prevent duplication and issues, remove any used printFrame from the DOM\n const usedFrame = document.getElementById(params.frameId)\n\n if (usedFrame) usedFrame.parentNode.removeChild(usedFrame)\n\n // Create a new iframe for the print job\n const printFrame = document.createElement('iframe')\n\n if (Browser.isFirefox()) {\n // Set the iframe to be is visible on the page (guaranteed by fixed position) but hidden using opacity 0, because\n // this works in Firefox. The height needs to be sufficient for some part of the document other than the PDF\n // viewer's toolbar to be visible in the page\n printFrame.setAttribute('style', 'width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0')\n } else {\n // Hide the iframe in other browsers\n printFrame.setAttribute('style', 'visibility: hidden; height: 0; width: 0; position: absolute; border: 0')\n }\n\n // Set iframe element id\n printFrame.setAttribute('id', params.frameId)\n\n // For non pdf printing, pass an html document string to srcdoc (force onload callback)\n if (params.type !== 'pdf') {\n printFrame.srcdoc = '<html><head><title>' + params.documentTitle + '</title>'\n\n // Attach css files\n if (params.css) {\n // Add support for single file\n if (!Array.isArray(params.css)) params.css = [params.css]\n\n // Create link tags for each css file\n params.css.forEach(file => {\n printFrame.srcdoc += '<link rel=\"stylesheet\" href=\"' + file + '\">'\n })\n }\n\n printFrame.srcdoc += '</head><body></body></html>'\n }\n\n // Check printable type\n switch (params.type) {\n case 'pdf':\n // Check browser support for pdf and if not supported we will just open the pdf file instead\n if (Browser.isIE()) {\n try {\n console.info('Print.js doesn\\'t support PDF printing in Internet Explorer.')\n const win = window.open(params.fallbackPrintable, '_blank')\n win.focus()\n params.onIncompatibleBrowser()\n } catch (error) {\n params.onError(error)\n } finally {\n // Make sure there is no loading modal opened\n if (params.showModal) Modal.close()\n if (params.onLoadingEnd) params.onLoadingEnd()\n }\n } else {\n Pdf.print(params, printFrame)\n }\n break\n case 'image':\n Image.print(params, printFrame)\n break\n case 'html':\n Html.print(params, printFrame)\n break\n case 'raw-html':\n RawHtml.print(params, printFrame)\n break\n case 'json':\n Json.print(params, printFrame)\n break\n }\n }\n}\n",
291
+ "import './sass/index.scss'\nimport print from './js/init'\n\nconst printJS = print.init\n\nif (typeof window !== 'undefined') {\n window.printJS = printJS\n}\n\nexport default printJS\n"
292
+ ],
293
+ "sourceRoot": ""
294
+ }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.8.21",
7
+ "version": "2.8.22",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
package/src/perf.js ADDED
@@ -0,0 +1,76 @@
1
+ Ext.define('Coon.perf', {
2
+ singleton: true,
3
+
4
+ perfs: new Map(),
5
+
6
+ clear(key) {
7
+ this.perfs.set(key, false);
8
+ },
9
+
10
+ start(key = Ext.id(false, 'perf'), clearFlag) {
11
+ if (clearFlag) {
12
+ this.clear(key);
13
+ }
14
+ const measure = this.perfs.get(key);
15
+ if (measure) {
16
+ measure.start = performance.now();
17
+ this.perfs.set(key, measure);
18
+ } else {
19
+ this.perfs.set(key, {
20
+ __measure: true,
21
+ start: performance.now(),
22
+ count: 0,
23
+ time: 0,
24
+ min: Number.POSITIVE_INFINITY,
25
+ max: 0,
26
+ avg: 0,
27
+ total: 0,
28
+ });
29
+ }
30
+ return () => this.stop(key);
31
+ },
32
+
33
+ stop(key) {
34
+ if (!key || !this.perfs.has(key)) {
35
+ return;
36
+ }
37
+ const measure = this.perfs.get(key);
38
+ const diff = performance.now() - measure.start;
39
+ measure.name = key;
40
+ measure.count += 1;
41
+ measure.start = false;
42
+ measure.time = diff;
43
+ measure.total += diff;
44
+ measure.avg = measure.total / measure.count;
45
+ measure.min = measure.min > diff ? diff : measure.min;
46
+ measure.max = measure.max < diff ? diff : measure.max;
47
+ this.perfs.set(key, measure);
48
+ return measure;
49
+ },
50
+
51
+ isMeasure(measure) {
52
+ return Ext.isObject(measure) &&
53
+ measure.__measure;
54
+ },
55
+
56
+ getLog(key) {
57
+ const measure = this.isMeasure(key) ? key : this.getMeasure(key);
58
+ if (!measure) {
59
+ return 'measure not found';
60
+ }
61
+ return `
62
+ measure name: ${measure.name},
63
+ run count: ${measure.count},
64
+ total time, ms: ${measure.total}, sec: ${(measure.total / 1000).toFixed(3)},
65
+ ---------------
66
+ last time, ms: ${measure.time}, sec: ${(measure.time / 1000).toFixed(3)},
67
+ avg time, ms: ${measure.avg}, sec: ${(measure.avg / 1000).toFixed(3)},
68
+ min time, ms: ${measure.min}, sec: ${(measure.min / 1000).toFixed(3)},
69
+ max time, ms: ${measure.max}, sec: ${(measure.max / 1000).toFixed(3)}
70
+ `;
71
+ },
72
+
73
+ getMeasure(key) {
74
+ return this.perfs.get(key);
75
+ },
76
+ });
@@ -8,7 +8,7 @@ Ext.define('Coon.report.plugin.grid.FilterFormEditingPlugin', {
8
8
  /* description: 'Отключает возможность выделения строк',
9
9
  tags: ['Фильтры'],*/
10
10
  init: function(filterPanel) {
11
- filterPanel.on('render', this.onRenderFilterPanel, this);
11
+ filterPanel.on('added', this.onRenderFilterPanel, this);
12
12
  this.filterPanel = filterPanel;
13
13
  filterPanel.removeAll();
14
14
  filterPanel.add({
@@ -13,7 +13,7 @@ Ext.define('Coon.report.plugin.grid.ToolbarButtonPlugin', {
13
13
  * добавить кнопку на панель или не стоит:)
14
14
  */
15
15
  addButtonOnToolbar: true,
16
-
16
+ addToContextMenu: false,
17
17
  addToColumnMenu: false,
18
18
  /**
19
19
  * text on button.If undefined button shows without text
@@ -53,7 +53,6 @@ Ext.define('Coon.report.plugin.grid.ToolbarButtonPlugin', {
53
53
  this.separateAction = new Ext.Button(Ext.apply({
54
54
  isPlgBtn: true,
55
55
  text: this.buttonText,
56
- tooltip: this.tooltip,
57
56
  disabled: this.isCreatedButtonDisabled(),
58
57
  iconCls: this.buttonIconCls,
59
58
  handler: Ext.bind(this.handler, this),
@@ -72,9 +71,26 @@ Ext.define('Coon.report.plugin.grid.ToolbarButtonPlugin', {
72
71
  if (this.addToColumnMenu) {
73
72
  this.component.getStore().on('load', this.addColumnMenuItem, this, {single: true});
74
73
  }
74
+ if (this.addToContextMenu && this.component.contextMenu) {
75
+ this.component.getStore().on('load', this.addToContextMenuHandler, this, {single: true});
76
+ }
75
77
  this.setActionColumn();
76
78
  },
77
79
 
80
+ addToContextMenuHandler: function(config) {
81
+ const menu = this.component.contextMenu;
82
+ if (this.buttonUI && !config['ui']) {
83
+ config['ui'] = this.buttonUI;
84
+ }
85
+ menu && menu.add(new Ext.menu.Item({
86
+ text: this.buttonText,
87
+ iconCls: this.buttonIconCls,
88
+ ui: this.buttonUI,
89
+ handler: Ext.Function.createSequence(Ext.bind(this.handler, this), function() {
90
+ menu.hide();
91
+ }),
92
+ }));
93
+ },
78
94
  setActionColumn: function() {
79
95
  if (this.columnExists || !(this.addActionColumn || this.addActionColumnNew)) {
80
96
  return;
@@ -104,6 +104,7 @@ Ext.define('Coon.report.plugin.grid.ToolbarItemPlugin', {
104
104
  position: this.position,
105
105
  sortSequence: this.sortSequence,
106
106
  pType: this.pluginConfig ? this.pluginConfig.ptype : '',
107
+ itemId: this.pluginId,
107
108
  };
108
109
  if (!this.position || isNaN(Number(this.position)) || Number(this.position) <= 0) {
109
110
  cfg.position = this.sortSequence;
@@ -0,0 +1,284 @@
1
+ Ext.define('Coon.report.plugin.grid.exporters.xlsxExporter', {
2
+
3
+ defaultFieldType: 'string',
4
+
5
+ constructor(cfg) {
6
+ Ext.apply(this, cfg);
7
+ },
8
+
9
+ getExporter(filename) {
10
+ const stopMeasure = Coon.perf.start('getExporter', true);
11
+ const exporter = Ext.create('Ext.exporter.excel.Xlsx', {
12
+ fileName: filename + '.xlsx',
13
+ tableHeaderStyle: this.tableHeaderStyle,
14
+ });
15
+ this.plugin.exporter = exporter;
16
+ exporter.excel = new Ext.exporter.file.ooxml.Excel({
17
+ properties: {
18
+ title: 'Лист 1',
19
+ },
20
+ });
21
+
22
+ exporter.worksheet = exporter.excel.addWorksheet({
23
+ name: 'Лист 1',
24
+ });
25
+ this.prepareData();
26
+
27
+ Coon.log.debug(
28
+ Coon.perf.getLog(stopMeasure())
29
+ );
30
+ const {headerRows, dataRows, footerRows} =
31
+ this.collectGridDataAsObject(this.getSelected(), exporter.excel);
32
+ const tableHeaderRows = this.getTableHeaderRows(exporter);
33
+ const summaryRows = this.getSummaryRows(exporter.excel);
34
+ exporter.jsonData = [...headerRows, ...tableHeaderRows, ...dataRows, ...summaryRows, ...footerRows];
35
+ exporter.getContent = this.getContent.bind(exporter, this);
36
+ return exporter;
37
+ },
38
+
39
+ getContent: function() {
40
+ const me = this;
41
+ const config = this.getConfig();
42
+ me.tableHeaderStyleId = me.excel.addCellStyle(config.tableHeaderStyle);
43
+ me.worksheet.beginRowRendering();
44
+ if (this.jsonData) {
45
+ this.jsonData.forEach((row) => {
46
+ me.worksheet.addRow().addCell(row);
47
+ });
48
+ }
49
+ me.worksheet.endRowRendering();
50
+ me.columnStylesNormal = me.columnStylesNormalId = me.columnStylesFooter = null;
51
+ me.columnStylesFooterId = me.headerStyles = me.footerStyles = null;
52
+
53
+ return me.excel.render();
54
+ },
55
+
56
+ collectGridDataAsObject: function(selections, workbook) {
57
+ const stopMeasure = Coon.perf.start('collectGridDataAsObject', true);
58
+ const dataRows = [];
59
+ let headerRows = [];
60
+ let footerRows = [];
61
+ const grid = this.getCmp();
62
+ const columnModel = grid.getColumns().reduce((acc, column) => {
63
+ if (!column.hidden) {
64
+ acc.push(column);
65
+ }
66
+ return acc;
67
+ }, []);
68
+ const columnCount = columnModel.length;
69
+ if (this.addHeader === true) {
70
+ headerRows = this.collectHeaderJson(columnCount, workbook);
71
+ }
72
+ if (this.addFilters === true) {
73
+ headerRows = headerRows.concat(
74
+ this.collectFiltersJson(columnCount, workbook)
75
+ );
76
+ }
77
+ if (this.headerXlsx) {
78
+ headerRows = headerRows.concat(this.parseJsEditorObj(this.headerXlsx, workbook));
79
+ }
80
+ const dataIndexToColumn = {};
81
+ const visibleColumns = [];
82
+ const columnIndexToDataIndex = [];
83
+
84
+ for (let idx = 0; idx < columnCount; idx++) {
85
+ const el = columnModel[idx];
86
+ if (el.dataIndex) {
87
+ visibleColumns.push(idx);
88
+ columnIndexToDataIndex[idx] = el.dataIndex;
89
+ dataIndexToColumn[el.dataIndex] = columnModel[idx];
90
+ }
91
+ }
92
+ // debugger;
93
+ const fieldTypes = this.getCmp().getStore().getModel().getFields().reduce((acc, field) => {
94
+ acc.set(field.name, field.type || this.defaultFieldType);
95
+ return acc;
96
+ }, new Map());
97
+
98
+ this.localData = {
99
+ fieldTypes,
100
+ grid,
101
+ visibleColumns,
102
+ columnIndexToDataIndex,
103
+ columnModel,
104
+ dataIndexToColumn,
105
+ workbook,
106
+ };
107
+
108
+ selections.forEach(function(record, idx) {
109
+ dataRows.push(
110
+ this.collectColumns({
111
+ record,
112
+ idx,
113
+ xlsx: true,
114
+ })
115
+ );
116
+ }, this);
117
+ if (this.footerXlsx) {
118
+ footerRows = this.parseJsEditorObj(this.footerXlsx, workbook);
119
+ }
120
+ Coon.log.debug(
121
+ Coon.perf.getLog(stopMeasure())
122
+ );
123
+ Coon.log.debug(
124
+ Coon.perf.getLog('collectColumns')
125
+ );
126
+
127
+ return {headerRows, dataRows, footerRows};
128
+ },
129
+
130
+ /**
131
+ * Формируем заголовок
132
+ * @returns {Object[] || []}
133
+ */
134
+ collectHeaderJson: function(columnCount, workbook) {
135
+ const reportPanel = this.getCmp().up('ReportPanel');
136
+ const result = [];
137
+ // Работа с отображением выгрузок
138
+ if (this.addHeader === true) {
139
+ result.push({
140
+ value: reportPanel.title,
141
+ mergeAcross: columnCount || 1,
142
+ styleId: workbook.addCellStyle({
143
+ font: {
144
+ bold: true,
145
+ size: 17,
146
+ },
147
+ }),
148
+ });
149
+ }
150
+ return result;
151
+ },
152
+
153
+ /**
154
+ * Собираем фильтры
155
+ * @returns {string}
156
+ */
157
+ collectFiltersJson: function(columnCount, workbook) {
158
+ const reportPanel = this.getCmp().up('ReportPanel');
159
+ const result = [];
160
+ if (this.addFilters === true) {
161
+ result.push({
162
+ value: 'Используемые фильтры:',
163
+ mergeAcross: columnCount || 1,
164
+ styleId: workbook.addCellStyle({
165
+ font: {
166
+ bold: true,
167
+ size: 13,
168
+ color: '#a6a4a4',
169
+ },
170
+ }),
171
+ });
172
+
173
+ const customXtype = ['SimpleReportTag'];
174
+ const filterComponents = function(comp) {
175
+ return Ext.getClassName(comp) !== 'Ext.form.field.Display' &&
176
+ !Ext.isEmpty(comp.getValue()) &&
177
+ comp.xtype !== 'CustomValueCheckBox'; // todo: как-то узнать, почему нельзя этот компонент вывести в файл
178
+ };
179
+ const renderFilterConditions = function(filter) {
180
+ if (customXtype.includes(filter.xtype)) {
181
+ let tmp = '';
182
+ filter.valueCollection.items.forEach(function(it) {
183
+ tmp = tmp + it.getData()[filter.getDisplayField()];
184
+ });
185
+ result.push({
186
+ value: filter.fieldLabel + ': ' + tmp,
187
+ mergeAcross: columnCount || 1,
188
+ styleId: workbook.addCellStyle({
189
+ font: {
190
+ color: '#a6a4a4',
191
+ },
192
+ }),
193
+ });
194
+ } else if (!filter.initialConfig.hidden) {
195
+ const label = (Ext.getClassName(filter) === 'Ext.form.field.Checkbox') ?
196
+ filter.boxLabel || filter.fieldLabel :
197
+ filter.fieldLabel;
198
+
199
+ const rawValue = Ext.isBoolean(filter.getRawValue()) ? filter.getRawValue() ? 'Да' : 'Нет' :
200
+ filter.getRawValue();
201
+ result.push({
202
+ value: label + ': ' + rawValue,
203
+ mergeAcross: columnCount || 1,
204
+ styleId: workbook.addCellStyle({
205
+ font: {
206
+ bold: true,
207
+ },
208
+ }),
209
+ });
210
+ }
211
+ };
212
+ reportPanel.filterContainer.query('field')
213
+ .filter(filterComponents)
214
+ .forEach(renderFilterConditions);
215
+ }
216
+ return result;
217
+ },
218
+
219
+ /**
220
+ * Собираем поля
221
+ * @returns {string}
222
+ */
223
+ collectColumns: function({record, idx, xlsx}) {
224
+ const stopMeasure = Coon.perf.start('collectColumns');
225
+ const {grid, visibleColumns, columnIndexToDataIndex, columnModel, dataIndexToColumn, workbook} = this.localData;
226
+ const result = [];
227
+ visibleColumns.forEach(function(columnIndex) {
228
+ const columnConfig = columnModel[columnIndex];
229
+ if (columnConfig.ignoreExport) {
230
+ return;
231
+ }
232
+
233
+ const dataIndex = columnIndexToDataIndex[columnIndex];
234
+ const renderer = columnConfig.renderer;
235
+ const exportRenderer = columnConfig.exportRenderer;
236
+ const valueType = this.localData.fieldTypes.get(dataIndex);// getValueType(dataIndex, 'string');
237
+
238
+
239
+ const value = typeof (exportRenderer || renderer) === 'function' ?
240
+ (exportRenderer || renderer).call(
241
+ dataIndexToColumn[dataIndex],
242
+ record.get(dataIndex),
243
+ {column: columnConfig},
244
+ record,
245
+ idx,
246
+ columnIndex,
247
+ grid.getStore(),
248
+ grid.getView()
249
+ ) :
250
+ record.data[dataIndex] || '';
251
+ if (!xlsx) {
252
+ const styles = this.getRowStyle(grid, record);
253
+ result.push(`
254
+ <td
255
+ class="${this.getCellClass(value, valueType) || ''}"
256
+ style="${styles || ''}">
257
+ ${this.getRenderedValue(value, valueType) || ''}
258
+ </td>
259
+ `);
260
+ } else {
261
+ let styles = this.getRowStyleXlsx(grid, record, workbook);
262
+ const col = {value: this.getRenderedValue(value, valueType) || ''};
263
+ styles = this.mergeDeep(styles, this.allBordersStyle);
264
+ if (valueType === 'float') {
265
+ let precision = Number(columnConfig.precision);
266
+ if (!Number.isInteger(precision)) {
267
+ precision = Number(this.getConfig('floatPrecision') || this.defaultFloatPrecision);
268
+ }
269
+ styles = this.mergeDeep(styles, {format: precision !== 0 ? '0.'.padEnd(precision + 2, '0') : '0'});
270
+ if (col['value'].length) {
271
+ col['value'] = parseFloat(col['value'].replace(/\s/g, '').replace(',', '.'));
272
+ }
273
+ }
274
+
275
+ col['styleId'] = workbook.addCellStyle(styles);
276
+
277
+ result.push(JSON.parse(JSON.stringify(col)));
278
+ }
279
+ }, this);
280
+ stopMeasure();
281
+ return result;
282
+ },
283
+
284
+ });
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.8.21',
3
+ number: '2.8.22',
4
4
  });