/*! * Licensed Materials - Property of IBM * IBM Cognos Products: Modeling UI * (C) Copyright IBM Corp. 2020 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ (window.caModellingPerspective=window.caModellingPerspective||[]).push([[38],{1030:function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"d",function(){return o}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return i}),n.d(t,"e",function(){return c});var r="modeler-sql",o="XQE_queryResponse",a="cognosSQL",i="nativeSQL",c="SQL"},1243:function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return S});var r,o,a,i,c,l,u=n(0),s=n.n(u),p=n(6),d=n(5),g=n(2),f=n(262),y=n(1226),b=n(1884),m=n(1030);function h(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function v(e,t){for(var n=0;n750?window.innerHeight-250:500,r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.storeDidMount=function(){this.initQueryInformation()},n.changeSelectedSQLType=function(e){this.selectedFeedbackType=e},n.initQueryInformation=function(){var e=this;this.errorTitle=null,this.errorDetails=null,this.isLoading=!0,this.hasError=!1;var t=this.element.getObjectType(),n=Object(b.a)(this.element),r=Object(b.c)(n,t);return Object(f.a)(this.context,{moduleId:this.provider.getModuleId(),querySpec:JSON.stringify(r),qfb:"all",qfbMode:"validate"}).then(function(t){e.action(function(){e.queryFeedback=Object(b.b)(t)})}).catch(function(){return e.action(function(){e.hasError=!0})}).finally(function(){e.action(function(){return e.isLoading=!1})})},function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(t,[{key:"aceEditorStore",get:function(){return new y.a({},{mode:m.b,readOnly:!0,scope:this.scope,hasTree:!1})}},{key:"editorValue",get:function(){var e,t=this.queryFeedback,n=t.cognosSQL,r=t.nativeSQL,o=t.queryResponse;switch(this.selectedFeedbackType){case s.a.SqlLanguageType.COGNOS:e=n&&n.join("\r\n\r\n")||"";break;case s.a.SqlLanguageType.NATIVE:e=r&&r.join("\r\n\r\n")||"";break;default:e=o&&JSON.stringify(o,null,2)||""}return this.aceEditorStore.setText(e),e}}]),t}(d.a),o=E(r.prototype,"selectedFeedbackType",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return s.a.SqlLanguageType.COGNOS}}),a=E(r.prototype,"isLoading",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),i=E(r.prototype,"hasError",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),c=E(r.prototype,"queryFeedback",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),l=E(r.prototype,"contentHeight",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 500}}),E(r.prototype,"changeSelectedSQLType",[d.c],Object.getOwnPropertyDescriptor(r.prototype,"changeSelectedSQLType"),r.prototype),E(r.prototype,"aceEditorStore",[d.k],Object.getOwnPropertyDescriptor(r.prototype,"aceEditorStore"),r.prototype),E(r.prototype,"initQueryInformation",[d.c],Object.getOwnPropertyDescriptor(r.prototype,"initQueryInformation"),r.prototype),E(r.prototype,"editorValue",[p.computed],Object.getOwnPropertyDescriptor(r.prototype,"editorValue"),r.prototype),r)},1877:function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return y});var r,o=n(1),a=n.n(o),i=n(16),c=n(3),l=n(25),u=n(5),s=n(2),p=n(10),d=n(44),g=n(1878),f=n(1243);var y=Object(d.a)(p.t,{initializer:function(e,t){return new f.default({context:e},{activeElement:t.activeElement,element:t.element,label:t.label})}})(r=Object(u.e)(function(e){return{mode:e.mode,contentHeight:e.contentHeight}})(r=Object(i.observer)(r=function(e){function t(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props,t=e.contentHeight,n=e.onClose,r=e.prepareForClose,o=e.mode;return a.a.createElement(c.Dialog,{"data-tid":Object(l.a)("queryInfoDialog"),width:"100%",minWidth:"900px",onClose:function(){return!r&&n()}},a.a.createElement(c.Dialog.Header,{"data-tid":Object(l.a)("queryInfoDialog","header")},a.a.createElement(c.TruncatedText,{value:Object(s.getString)("queryInfoTitle")})),a.a.createElement(c.Dialog.Body,null,a.a.createElement(c.FlexLayout,{direction:"row",height:t},a.a.createElement(c.FlexItem,{grow:!0},a.a.createElement(g.a,{mode:o})))),a.a.createElement(c.Dialog.Footer,null,a.a.createElement(c.Dialog.Button,{"data-tid":Object(l.a)("queryInfoDialog","close"),label:Object(s.getString)("close"),onClick:n})))},t}(o.Component))||r)||r)||r},1878:function(e,t,n){"use strict";n.d(t,"a",function(){return y});var r,o=n(1),a=n.n(o),i=n(16),c=n(5),l=n(2),u=n(776),s=n.n(u),p=n(25),d=n(19),g=n(3),f=n(1879);n(1882);var y=Object(c.e)(function(e){return{selectedFeedbackType:e.selectedFeedbackType,queryInfoTypes:e.queryInfoTypes,changeSelectedSQLType:e.changeSelectedSQLType,setEditor:e.aceEditorStore.setEditor,selectedItemLabel:e.label,isLoading:e.isLoading,editorText:e.editorText}})(r=Object(i.observer)(r=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o'});i.a.add(c),t.a=c}},["6986996ff9f096db46c3"])}(n(137))},1881:function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r,o=n(1),a=n.n(o),i=n(19),c=n(2),l=n(1023);function u(){return(u=Object.assign||function(e){for(var t=1;t