123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: rs
- // (C) Copyright IBM Corp. 2003, 2022.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- define(["_og4"],function(_lyc){"use strict";var _qa6={};_qa6._3v7={};_qa6._4mg=_frh;_qa6._pmg={};_qa6._w0f={};_qa6._kn3=function(_xxm){return this._pmg[_xxm];};_qa6._mh=function(_d6f,_pui){var _0um=Q.defer();var _lnj=[];_5ml._jll(["_48g"],function(_48g){for(var i=0;i<_d6f.length;i++){var _zpi=_d6f[ i ];if(_zpi.nodeName!="vizControl"||_gth._e51(_zpi.getAttribute("type"))){continue;}var _whc=this._2u(_zpi.getAttribute("type"), _pui, _48g);_lnj.push(_whc);}Q.all(_lnj).then(function(){_0um.resolve(true);}).done();}.bind(this));return _0um.promise;};_qa6._2u=function(_xxm,_pui,_48g){return _lyc._1em(_xxm, true).then(function(_97m){if(_97m.SDKConnectionFail||_97m.unavailable){return true;}return _qa6._m6(_97m, _pui, _48g);}.bind(this)); };_qa6._m6=function(_yhc,_pui,_48g){var _xxm=_yhc.id;return _48g._8o9(_xxm).then(function(_ddh){this._w0f[_xxm]=_ddh;var _p7k=this._pmg[_xxm]={};var _vj3="viz_"+_xxm; var _api=_pui._md4();var _56l=_7hn._ij8(_api, ".//objects");var _m6h=_7hn._ij8(_api, ".//properties"); var _cdc=_8qn._8x(_56l, "object", "name", _vj3 );if(_cdc){_pui._1j2(this._3v7[ _xxm ], [ _cdc ]);} _cdc=_8qn._u0g(_56l, "object");_cdc.setAttribute("name", _vj3);var _wif=_cdc.appendChild(_api.ownerDocument.createElement("namedSetRef"));_wif.setAttribute( "ref", "vizControlBuiltInProps" );var _rxa=_6qn._cdm( ["boolean", "enum", "string", "number", "color", "palette", "font", "length", "baselines"] );var _aul=this._3v7[ _xxm ]=[];for(var _amc in _yhc.propertyGroups){var _wgc=_yhc.propertyGroups[_amc];var _qrm=_8qn._u0g(_m6h, "group");_qrm.setAttribute("name", _amc);_qrm.setAttribute("label", _wgc.label||_amc);for(var i=0;i<_wgc.properties.length;i++){var _sal=_wgc.properties[i]; if(!_rxa.has(_sal.type)){continue;}var _5dk=_gth._xl(_xxm, _sal.name);_p7k[ _5dk ]=_sal;var _z9n=_8qn._u0g(_qrm, "property"); _z9n.setAttribute("name", _5dk);_z9n.setAttribute("label", _sal.caption);_z9n.setAttribute("propertyType", "vizControl");_z9n.setAttribute("propertyV5NodeName", _sal.v5NodeName);switch(_sal.type){case "boolean":_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("type", "dropDownList");_z9n.setAttribute("listView", "Boolean");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultDelete", "remove");break;case "string":_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("type", "text");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultDelete", "remove");break;case "number":_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("type", "text");_z9n.setAttribute("dataType", "decimal");if(_sal.minValue){_z9n.setAttribute("min", _sal.minValue.value);}if(_sal.maxValue){_z9n.setAttribute("max", _sal.maxValue.value);}_z9n.setAttribute("defaultDelete", "remove");_z9n.setAttribute("isMultiSelect", "true");break;case "enum":_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("type", "dropDownList");_z9n.setAttribute("listView", _5dk);_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultDelete", "remove");var d=this._4mg._yq9();var _ozj=d.documentElement.selectSingleNode("listView[@id=" + _cgm._zxc( _5dk ) + "]" );if(_ozj){_8qn._oa5(_ozj.selectNodes("*"));}else{_ozj=d.documentElement.appendChild(d.createElement("listView"));_ozj.setAttribute("id", _5dk);}var _ini=_ozj.appendChild(d.createElement("listItems"));var _4vl=_sal.possibleValues;if(_4vl.length==0){var _q17=_ddh.properties.get(_sal.name);if(_q17&&_q17.possibleValues){_4vl=_q17.possibleValues;}}for(var j=0; j<_4vl.length; j++){var _3vm=_4vl[j];var _mzj=_ini.appendChild(d.createElement("listItem"));_mzj.setAttribute("value", _3vm.name);_mzj.setAttribute("label", _3vm.caption);}break;case "color":_z9n.setAttribute("type", "colorAction");_z9n.setAttribute("isPopup", "true");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("defaultDelete", "remove"); break;case "palette":_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("type", "action");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultDelete", "remove");_z9n.setAttribute("limitWidth", "false");break;case "font":_z9n.setAttribute("type", "action");_z9n.setAttribute("isPopup", "true");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("defaultDelete", "remove");break;case "length":_z9n.setAttribute("type", "action");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("defaultDelete", "remove");break;case "baselines":_z9n.setAttribute("type", "action");_z9n.setAttribute("isPopup", "true");_z9n.setAttribute("isMultiSelect", "true");_z9n.setAttribute("defaultBehavior", "true");_z9n.setAttribute("defaultDelete", "remove"); break;}var _u6l=_8qn._u0g(_cdc, "propertyRef");_u6l.setAttribute("ref", _5dk);}_aul.push(_qrm);}_pui._w7j(false);_pui._wi2(_aul, [_cdc]);return true;}.bind(this)); };return _qa6;});
|