_nx2.js 17 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. define([],function(){"use strict";function _nx2(_83m){this._xba=_83m;this._irl=this._xba.cloneNode(true);};_nx2.prototype._a6j=function(){return this._irl;};_nx2.prototype._356=function(_gfl,_w69){var _426=_cgm._zxc(_gfl);var _35l=this._irl.selectSingleNode("layouts");var _t9n=_dth._l7b(this._irl, _erh._9kl(_gfl));var _b2m=_ath._36j(_t9n);_b2m.parentNode.removeChild(_b2m);_8qn._k5g(_35l, "*");if(_b2m.nodeName=="conditionalLayout"){_b2m.removeAttribute("refVariableValue");_b2m=_8qn._c6g(_b2m, "layout");}_35l.appendChild(_b2m); if(!_qkk._qik("showMultipleLogicalPagePreview")){if(_w69){_8qn._k5g( _b2m, "reportPages//page[@iid!=" + _426 + "]" );_8qn._k5g(_b2m, "reportPages//pageSet[not(.//page)]");_8qn._k5g(_b2m, "reportPages//bookletItem");}else{_8qn._k5g( _b2m, "*//page[@iid!=" + _426 + "]" );_8qn._k5g(_b2m, "*//pageSet[not(.//page)]");_8qn._k5g(_b2m, "*//bookletItem");}}_q0n._bsc(_b2m);_8qn._k5g(_b2m, ".//TOCEntry");_8qn._k5g(_b2m, ".//reportDrills");_8qn._qt9( _b2m, ".//crosstabFactCell[@applySingleDefaultStyle='true']", "applySingleDefaultStyle");var nl=this._irl.selectNodes( "layouts//layoutComponentRef[not(reportPath) and not(layoutComponent)][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){var _0y5=nl.item(i);var _vdn=_0y5.getAttribute("refLayoutElement");if(!_wle._y56(this._irl, _vdn)){var _ec9=_wle._y56(this._xba, _vdn);_0y5.appendChild(this._irl.ownerDocument.createElement("layoutComponent")).appendChild(_ec9.cloneNode(true));}}};_nx2.prototype._07=function(){var _vt5=["((self::filterCompare | self::filterStringCompare) and filterValue[not(text()) or text()=''])","(self::filterInValues and not(filterValues))","(self::filterRange and not(filterFrom or filterTo))","(self::filterInMembers and not(dmMembers))"];var _vq="queries/query//filterDefinition//*[@parameterized='true'][" + _vt5.join( " or " ) + "]";var _c4k=_8qn._k5g(this._irl, _vq);var _9ji=_c4k.length;if(_9ji==0){return;}var _uz7=true;while(_uz7){_uz7=false;_c4k=_8qn._k5g( this._irl,"queries/query//filterDefinition//*[self::filterAnd | self::filterOr | self::filterNot][not(*)]");_uz7=_c4k.length>0;_c4k=this._irl.selectNodes("queries/query//filterDefinition//*[self::filterAnd | self::filterOr][count(*)=1]");_9ji=_c4k.length;if(_9ji>0){_uz7=true;for(var i= 0;i<_9ji;i++){var _w0k=_c4k.item(i);var _f6l=_w0k.selectSingleNode("*");_w0k.parentNode.replaceChild(_f6l, _w0k);}}}_8qn._k5g( this._irl, "queries/query/detailFilters/detailFilter/filterDefinition[not(*)] | queries/query/summaryFilters/summaryFilters/filterDefinition[not(*)]" );_8qn._k5g( this._irl, "queries/query/detailFilters/detailFilter[not(*)] | queries/query/summaryFilters/summaryFilters[not(*)]" );_8qn._k5g( this._irl, "queries/query/detailFilters[not(detailFilter)] | queries/query/summaryFilters[not(summaryFilter)]" );};_nx2.prototype._8m3=function(_bu6){var d=this._irl.ownerDocument;var _0pi=this._irl.selectSingleNode(_bu6?"layouts//promptPages":"layouts//reportPages");var _o7m=_gyc._t5j();var _cs6=_qkk._qik("AdornmentsEnable");var _bs6=_cs6?_qkk._qik("AdornmentsBorders"):false;var _es6=_cs6?_qkk._qik("AdornmentsPadding"):false;var _fs6=_cs6?_qkk._qik("AdornmentsSorting"):false;this._h82(_0pi);this._eo2(_0pi);this._i82(_0pi);this._g83(_0pi);if(!_qkk._qik("showMultipleLogicalPagePreview")){this._irl.removeAttribute("viewPagesAsTabs");}_8qn._k5g(_0pi, ".//noDataHandler");this._fo2(_0pi);if(_es6){this._bp(_0pi);}else{var nl=_0pi.selectNodes( ".//*[self::tableCell | self::block | self::conditionalBlockDefault | self::fieldSet | self::fieldSetCaption | self::hyperlink]/contents[not(*)][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){_8qn._x8b( nl.item( i ), "HTMLItem/dataSource/staticValue", true ).text = "<SPAN style='display:none'>&nbsp;</SPAN>";}}this._mg6(_0pi);this._801(_0pi);var _h9c=_8qn._w6b(this._irl, "drillBehavior");_h9c.setAttribute( "drillUpDown", "false" );_h9c.setAttribute( "modelBasedDrillThru", "true" );_8qn._k5g(this._irl, "queries/query/slicer/contextSlice/parameterizedSlice");this._07();_8qn._161(this._irl.selectNodes("queries/query//filterDefinition//*[@parameterized]"), "parameterized");if(!_cs6||!_qkk._qik("AdornmentsPageHeaderFooter")){var _bvk=_8qn._6l3( null, _0pi.selectNodes( ".//page/*[self::pageHeader | self::pageFooter]" ) );_s0n._0bb( _bvk, "display", "none" );}var nl=_0pi.selectNodes(".//block");var _f4n=[];for(var i=0;i<nl.length;i++){var _2rm=nl.item(i);if(!_s0n._bee(this._irl, _2rm)){_f4n.push(_2rm);}}_s0n._0bb( _f4n, "width", "100%" );if(_fs6){var nl=this._irl.selectNodes(".//list[sortList | listGroups/listGroup/sortList]");for(var i=0; i<nl.length;++i){var _j9n=nl.item(i);var _v9h=_j9n.selectNodes("sortList/sortItem | listGroups/listGroup/sortList/sortItem");var _cvi={};for(var j=0; j<_v9h.length;++j){var _42k=_v9h.item(j);var _79k=_42k.getAttribute("refDataItem");if(!_cvi[_79k]){_cvi[_79k]=true;var _9e2=_j9n.selectSingleNode("listColumns/listColumn[listColumnBody/contents//@refDataItem=" + _cgm._zxc( _79k ) + "][count(listColumnBody/contents//@refDataItem)=1]/listColumnTitle/contents");if(_9e2){_9e2.appendChild(this._g62("<IMG src='" + _gyc._t5j() + "images/sortStateList_" + _42k.getAttribute("sortOrder") + ".gif' class='clsListSortState'/>"));}}}}}this._vw3(_0pi, _es6, _bs6);this._6p(_0pi);if(_vzm._49b()){_agm._j7g(this._irl);}this._iu();this._cp(_0pi, _bs6, _es6);};_nx2.prototype._g62=function(_fpn,_hpn){var _uyj=this._irl.ownerDocument.createElement("HTMLItem");if(_qkk._qik("SendAppUsageFlagOnRun")){this._rc6(_uyj, "appUsage", "true", "XML");}_8qn._x8b(_uyj, "dataSource/staticValue", true).text=_fpn;if(_hpn){_uyj.setAttribute("iid", _hpn);}return _uyj;};_nx2.prototype._iu=function(){var _4vl=_8qn._fde(null, this._irl.selectNodes("descendant-or-self::*/@refStyle"));_8qn._k5g( this._irl, "classStyles/classStyle" + _8qn._j12( "name", "=", _4vl, "or", false, true ) );};_nx2.prototype._vw3=function(_0pi,_es6,_bs6){var _f0e=( this._cs6&&_qkk._qik( "AdornmentsBorders" )&&_qkk._qik( "AdornmentsBordersOverride" ) )?_2e7._bf8( "idBordersOn" ):null;var _r1c=(_es6||_bs6);if(!this._t5i){this._t5i=_8qn._o5b( ".//", _geb._u33, "[@iid][not(ancestor::layoutComponent)]" );}var _z2e=_4ke;var nl=_0pi.selectNodes(this._t5i);var _tzl=nl.length;for(var i=0;i<_tzl;i++){var n=nl.item(i);var _ick=n.nodeName;if(_r1c&&_z2e._ue4(n, "classes")){var _juk=_s0n._lp9(n);_juk.unshift(_ick);_s0n._kqh(n, _juk);}this._rc6( n, "roid", n.getAttribute( "iid" ) );if(!_dth._hr9(n, "specname")){this._rc6(n, "specname", _ick);}if(_f0e){var _h4e=_f0e._0oh("."+_ick);if(_h4e){var _tkn=_8qn._987(n, "style/CSS", true);var _uxm=_tkn.getAttribute("value");_tkn.setAttribute( "value", _uxm?( _uxm + ";" + _h4e ):_h4e );}}}};_nx2.prototype._h82=function(_0pi){if(!this._rfa){var _w8i=["hyperlink","HTMLItem","layoutComponentRef","asOfTime","richTextItem","TOC","TOCEntry","CMMMap"];_w8i=_w8i.concat(_geb._lw9);_nx2.prototype._rfa =".//list[not(listColumns/listColumn)][not(ancestor::layoutComponent)] | " +".//crosstab[not(descendant::*[@refDataItem])][not(ancestor::layoutComponent)] | " +".//repeaterTable[not(repeaterTableCell/contents/*)][not(ancestor::layoutComponent)] | " +".//*[self::repeater or self::singleton][not(contents/*)][not(ancestor::layoutComponent)] | " +_8qn._o5b( ".//", _w8i, "[not(ancestor::layoutComponent)]" );}var d=_0pi.ownerDocument;var nl=_0pi.selectNodes(this._rfa);var _tzl=nl.length;for(var i=0;i<_tzl;i++){var n=nl.item(i);var _5dn=(new _oc8(n, true, false, true, true))._wfn();var _uyj=n.parentNode.insertBefore(this._g62(_nx2._6yc(_5dn), n.getAttribute("iid")),n);switch(n.nodeName){case "asOfTime":case "TOC":case "TOCEntry":break;default:n.parentNode.removeChild(n);}}};_nx2.prototype._g83=function(_0pi){var d=_0pi.ownerDocument;var nl=_0pi.selectNodes(".//viz");var _tzl=nl.length;for(var i=0;i<_tzl;i++){var n=nl.item(i);if(!_7qn._7vc(n)){n.parentNode.replaceChild(this._g62(_nx2._6yc(this._ek4(n)), n.getAttribute("iid")), n);}}};_nx2.prototype._i82=function(_0pi){var d=_0pi.ownerDocument;var _z7m=_8qn._o5b(".//", _geb._oe7);var nl=_0pi.selectNodes(_z7m);var _tzl=nl.length;for(var i=0;i<_tzl;i++){var n=nl.item(i);if(!_n0n._c12(n)){n.parentNode.replaceChild(this._g62(_nx2._6yc(this._363(n)), n.getAttribute("iid")), n);}}};_nx2.prototype._6p=function(_0pi){var d=_0pi.ownerDocument;var _z7m=_8qn._o5b(".//", _geb._oe7);var nl=_0pi.selectNodes(_z7m);var _tzl=nl.length;var _3bc=_frh._53g("customChartNoDataHandler").selectSingleNode("*");for(var i=0;i<_tzl;i++){var n=nl.item(i);var _5gf=_erh._woh(_3bc, true);var _2rm=_5gf.selectSingleNode(".//table");_dth._ru9(_2rm, "roid", n.getAttribute("iid"), "HTML");_dth._ru9(_2rm, "specname", n.nodeName, "HTML");n.appendChild(_5gf);}};_nx2.prototype._363=function(_8rm){var _lbh=new _oc8(_8rm, true);var _xtn=new _ece();var _1ae="display: inline;";var _axf="width:300px; height:180px; text-align: center;";_1ae="display: inline-block;";_axf="text-align:center !important;";_lbh._7p9(_xtn, _8rm, "DIV", _lbh._psc(_8rm, _1ae, _axf));if(!_geb._wsh[_8rm.nodeName]){var _fon=_n0n._z77(_8rm);_xtn._uzm('<IMG src="images/chart/' + _fon + '" style="width:154px;height:110px;" class="clsEmptyChartImg"/>');}else{var _yti=_fnl._v66(_8rm);_xtn._uzm('<IMG src="' + _yti.img + '" style="width:' + _yti.width + 'px;height:' + _yti.height + 'px;" class="clsEmptyChartImg"/>');}_xtn._uzm("<DIV class='clsEmptyChartText'>");_xtn._uzm('<IMG src="' + _zpn._m2g( "cchl/images/insert_arrow_small.gif" ) + '" style="vertical-align:middle; width: 17px; height: 13px; margin: 0px 8px 0px 8px;"/>');_xtn._uzm(_frh._c6j("IDS_MSG_EMPTYCHART"));_xtn._uzm("</DIV>");_xtn._uzm("</DIV>");return _xtn._fkk();};_nx2.prototype._ek4=function(_8rm){var _lbh=new _oc8(_8rm, true);var _xtn=new _ece();var _lkc=_4qn._k3g();_3jl._qo9(_lbh, _8rm, _xtn, _lkc, true);return _xtn._fkk();};_nx2.prototype._eo2=function(_0pi){var d=_0pi.ownerDocument;var nl=_0pi.selectNodes(".//crosstab[not(crosstabFactCell)][not(ancestor::layoutComponent)]");var _tzl=nl.length;var _e88=(_tzl>0)?new _oc8(_0pi, true, false):null;for(var i=0;i<_tzl;i++){var _nxj=nl.item(i);var _eyj=_8qn._u0g(_nxj, "crosstabFactCell");_s0n._kqh( _eyj, [ "clsTemplateText", "crosstabFactCell", _n9g._x42 ] );_eyj.setAttribute( "iid", _nxj.getAttribute( "iid" ) );_eyj.setAttribute( "template", "true" );var _s38=_8qn._u0g(_eyj, "contents");var _tkn=_8qn._987(_eyj, "style/CSS", true);_tkn.setAttribute( "value", "height:200px;text-align:center;vertical-align:middle" );this._rc6(_eyj, "_9ml", _mlk._1b6);this._rc6(_eyj, "specname", _nxj.nodeName);var _xtn=new _ece();_xtn._uzm( '<DIV style="text-align:center;cursor:default;' );_e88._jv9(_xtn, "clsTemplateText");_xtn._uzm('"');if(_zpn._qsh["hal"]["enableAccessibility"]){_xtn._uzm( ' role="gridcell" tabIndex="0"' );}_xtn._uzm('>');_xtn._uzm( '<IMG src="' + _zpn._m2g('cchl/images/insert_arrow_small.gif') + '" style="margin-left:150px; width:17px; height:13px; vertical-align:middle; margin-right:5px"/><SPAN style="margin-right:150px">' );_xtn._uzm(_cgm._qoh(_frh._c6j("IDS_XTAB_MEASURES")));_xtn._uzm('</SPAN></DIV>');_s38.appendChild(this._g62(_nx2._6yc(_xtn._fkk())));}var nl=_0pi.selectNodes(".//crosstab[not(crosstabColumns/crosstabNode)][not(ancestor::layoutComponent)]");var _tzl=nl.length;if((_tzl>0)&&!_e88){_e88=new _oc8(_0pi, true, false);}for(var i=0;i<_tzl;i++){this._3j1(d, nl.item(i), true, _e88);}var nl=_0pi.selectNodes(".//crosstab[not(crosstabRows/crosstabNode)][not(ancestor::layoutComponent)]");var _tzl=nl.length;if((_tzl>0)&&!_e88){_e88=new _oc8(_0pi, true, false);}for(var i=0;i<_tzl;i++){this._3j1(d, nl.item(i), false, _e88);}};_nx2.prototype._3j1=function(d,_nxj,_gvl,_e88){var _k3m=_8qn._x8b( _nxj,(_gvl?"crosstabColumns":"crosstabRows" ) + "/crosstabNode/crosstabNodeMembers/crosstabSpacer", true );_k3m.setAttribute( "renderFactCells", "true" );var _jta=_8qn._u0g(_k3m, "contents");_s0n._kqh( _k3m, [ "clsTemplateText", "crosstabNodeMember", _n9g._w42 ] );var _tkn=_8qn._987(_k3m, "style/CSS", true);_tkn.setAttribute( "value", "text-align:center;vertical-align:middle;height:" + ( _gvl?"50px;":"200px;width:90px;" ) );var _5ek=_gvl?"crosstabColumnNodeStyle":"crosstabRowNodeStyle";this._rc6(_k3m, "specname", _5ek);_k3m.setAttribute( "iid", _nxj.selectSingleNode( _5ek ).getAttribute( "iid" ) );var _xtn=new _ece();_xtn._uzm( '<DIV style="text-align:center;cursor:default;' );_e88._jv9(_xtn, "clsTemplateText");_xtn._uzm('"');if(_zpn._qsh["hal"]["enableAccessibility"]){_xtn._uzm( ' role="gridcell" tabIndex="0"' );}_xtn._uzm('>');_xtn._uzm( '<IMG src="' + _zpn._m2g('cchl/images/insert_arrow_small.gif') + '" style="width:17px;height:13px;vertical-align:middle;margin-right:5px"/>' );_xtn._uzm(_cgm._qoh(_frh._c6j(_gvl?"IDS_XTAB_COLUMNS":"IDS_XTAB_ROWS")));_xtn._uzm('</DIV>');_jta.appendChild(this._g62(_nx2._6yc(_xtn._fkk())));this._rc6(_k3m, "_9ml", _gvl?_mlk._4e7:_mlk._wcb);};_nx2.prototype._5j5=function(_0pi){if(!_zpn._qsh["hal"]["enableAccessibility"]){return;}var s=_frh._c6j("IDS_AC_EDIT_TITLE");var nl=_0pi.selectNodes(".//textItem[not(ancestor::layoutComponent)]");var _tzl=nl.length;for(var i=0;i<_tzl;i++){var _k2k=nl.item(i);if(_k2k.selectSingleNode(".//defaultStyle[@refStyle='tt']")){var _lun=_k2k.selectSingleNode( "dataSource/staticValue[not(text()) or text()='']" );if(_lun){_lun.text=s;}}}};_nx2.prototype._fo2=function(_0pi){this._5j5(_0pi);var s=_frh._c6j("IDS_TEXTITEM_EMPTY");var nl=_0pi.selectNodes( ".//textItem/dataSource/staticValue[not(text()) or text()=''][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){nl.item(i).text=s;}};_nx2.prototype._mg6=function(_0pi){var _cpn=_gyc._t5j()+"images/def_el_image.svg";var nl=_0pi.selectNodes( ".//image/dataSource/staticValue[not(text()) or text()=''][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){nl.item(i).text=_cpn;}};_nx2.prototype._bp=function(_0pi){var nl=_0pi.selectNodes( ".//*[self::tableCell | self::block | self::conditionalBlockDefault | self::fieldSet | self::fieldSetCaption | self::hyperlink]/contents[not(*)][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){_8qn._x8b( nl.item( i ), "textItem/dataSource/staticValue", true ).text = " ";}var _e6m=_2e7._bf8("idPatCSS");var nl=_0pi.selectNodes( ".//*[self::pageHeader | self::pageBody | self::pageFooter]/contents[not(*)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){var n=nl.item(i);var _ick=n.parentNode.nodeName;var _5dn='<TABLE role="presentation" style="' + _e6m._0oh( ".clsTemplateText" ) + ';height:90%;width:100%"><TR><TD style="vertical-align:middle;text-align:center">';if(_zpn._qsh["hal"]["enableAccessibility"]){_5dn += '<SPAN tabIndex="0" role="gridcell">';}var b=((_ick=="pageBody" )&&_8qn._12g( n, "promptPages" ) );_5dn += _cgm._qoh( _frh._c6j( b?"IDS_MSG_EMPTY_PROMPTPAGE_BODY":( "IDS_MSG_EMPTY_" + _ick ) ) ).replace( "\n", "<BR/>" );if(_zpn._qsh["hal"]["enableAccessibility"]){_5dn+= '</SPAN>';}_5dn+= '</TD></TR></TABLE>';n.appendChild(this._g62(_5dn));}};_nx2.prototype._801=function(_0pi){var nl=_0pi.selectNodes( ".//crosstab/crosstabRows//*" + _geb._871 + "[not(ancestor::layoutComponent)]");var _tzl=nl.length;for(var i=0;i<_tzl;i++){this._rc6( nl.item( i ), "_irh", "true" );}nl=_0pi.selectNodes( ".//crosstab/*[self::crosstabRows or self::crosstabColumns]//*" + _geb._871 + "[not(ancestor::layoutComponent)]");_tzl=nl.length;for(var i=0;i<_tzl;i++){this._rc6(nl.item(i), "memberCaretOption", _mlk._7i(nl.item(i)));}};_nx2.prototype._cp=function(_0pi,_bs6,_es6){var _e17=_2e7;var _lxa={};var nl=_0pi.selectNodes("descendant-or-self::*/@refStyle");var _tzl=nl.length;for(var i=0;i<_tzl;++i){_lxa[nl.item(i).value]=true;}if(_bs6){_e17._6r( this._irl, (this._cs6&&_qkk._qik( "AdornmentsBordersOverride" ))?"idBordersOnOverride":"idBordersOn", _lxa );}if(_es6){_e17._6r(this._irl, "idPaddingOn", _lxa);}var _8gf=this._irl.selectSingleNode("classStyles");var d=this._irl.ownerDocument;_e17._owc( d, _8gf, "textItem", "cursor:default;" );_e17._owc( d, _8gf, "pageNumber", "cursor:default;" );_e17._owc( d, _8gf, "rowNumber", "cursor:default;" );_e17._owc( d, _8gf, "date", "cursor:default;" );_e17._owc( d, _8gf, "time", "cursor:default;" );_8qn._k5g(this._irl, "classStyles/classStyle[not(*)]");};_nx2._6yc=function(_5dn){if(!this._nsl){this._nsl=_gyc._t5j();this._avb=new RegExp( "src=([\"'])" + _zpn._1th, "g" );this._vea=new RegExp( "src=([\"'])" + _qgn._1th, "g" );this._9vb=new RegExp( "src=([\"'])" + _zpn._90d, "g" );}_5dn=_5dn.replace(this._avb, "src=$1"+this._nsl + _zpn._1th);_5dn=_5dn.replace(this._vea, "src=$1"+this._nsl + _qgn._1th);return _5dn.replace(this._9vb, "src=$1"+this._nsl + _zpn._90d);};_nx2.prototype._rc6=function(n,_vdn,_uxm,_0am){var _zyd=_8qn._w6b( n, "XMLAttributes" ).appendChild( n.ownerDocument.createElement( "XMLAttribute" ) );_zyd.setAttribute( "output", _0am||"HTML" );_zyd.setAttribute("name", _vdn);_zyd.setAttribute("value", _uxm);return _zyd;};return _nx2;});