/*! * 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([[3],{1011:function(e,t,r){"use strict";var o=r(77);t.a=Object(o.a)("tableCountStateExtension",function(){return{dirtyPointer:0,setDirty:function(){this.dirtyPointer+=1}}})},1211:function(e,t,r){"use strict";var o,n,a,i=r(1),s=r.n(i),l=r(3),u=r(165),c=r.n(u),d=r(2),p=r(44),m=r(10);r(1449);function h(){return(h=Object.assign||function(e){for(var t=1;t1?s.a.createElement(l.List,{length:e.length,itemRenderer:this._itemRenderer,virtualized:!1}):s.a.createElement(l.CodeSnippet,{className:"bi-mui-dataErrorview__preview",value:e[0].details||e[0].message})},t}(i.Component);f.defaultProps={data:[]};Object(p.a)(m.f)((a=n=function(e){function t(){return e.apply(this,arguments)||this}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.onClose,r=e.data;return s.a.createElement(l.Dialog,{onClose:function(){return t()},width:"700px"},s.a.createElement(l.Dialog.Header,null,Object(d.getString)("errorLogDetail")),s.a.createElement(l.Dialog.SubHeader,null,1===r.length&&r[0].code&&Object(d.getString)("errorCode",{value:r[0].code})),s.a.createElement(l.Dialog.Body,null,s.a.createElement(l.Container,{height:"400px",overflow:"auto"},s.a.createElement(f,{data:r}))),s.a.createElement(l.Dialog.Footer,null,s.a.createElement(l.Dialog.Button,{primary:!0,label:Object(d.getString)("ok"),onClick:function(){return t()}})))},t}(i.Component),n.defaultProps={data:[]},o=a))},1449:function(e,t,r){var o=r(1450);"string"==typeof o&&(o=[[e.i,o,""]]);var n={hmr:!0,transform:void 0};r(36)(o,n);o.locals&&(e.exports=o.locals)},1450:function(e,t,r){(e.exports=r(32)(void 0)).push([e.i,".bi-mui-dataErrorview__accordion,.bi-mui-dataErrorview__accordionItem{border:0}.bi-mui-dataErrorview__preview{height:100%}.bi-mui-dataErrorview__separator{border-color:#eaeaea}",""])},1451:function(e,t,r){"use strict";r.d(t,"a",function(){return p});var o,n=r(1),a=r.n(n),i=r(16),s=r(3),l=r(56),u=r.n(l),c=r(4),d=r(17);r(1452);var p=Object(i.observer)(o=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var r=t.prototype;return r.componentDidUpdate=function(){this.props.onUpdate&&this.props.onUpdate()},r.render=function(){var e=this.props,t=e.queryItem,r=e["data-tid"],o=d.getTextDirPref(),n=Object(c.isHidden)(t)?"bi-mui-gridHeader__hidden":"";return n+=" bi-mui-gridHeaderCol",Object(c.isFiltered)(t,{includeImported:!1})?a.a.createElement(s.Container,{gutter:[0,1],"data-tid":r,className:n},a.a.createElement(s.FlexLayout,{alignItems:"center",justifyContent:"space-between"},a.a.createElement(s.FlexItem,{className:"bi-mui-gridHeaderWithFilter"},t.getLabel()),a.a.createElement(s.FlexItem,null,a.a.createElement(s.SVGIcon,{pad:!0,iconId:u.a.id,size:"small"})))):a.a.createElement(s.Container,{maxWidth:400,gutter:[0,1],"data-tid":r,className:n},a.a.createElement(s.TruncatedText,{value:t.getLabel(),textDir:o}))},t}(n.Component))||o},1452:function(e,t,r){var o=r(1453);"string"==typeof o&&(o=[[e.i,o,""]]);var n={hmr:!0,transform:void 0};r(36)(o,n);o.locals&&(e.exports=o.locals)},1453:function(e,t,r){(e.exports=r(32)(void 0)).push([e.i,".bi-mui-gridHeader__hidden{opacity:.5}.bi-mui-gridHeaderCol{white-space:nowrap}.bi-mui-gridHeaderWithFilter{flex-shrink:inherit}",""])},1454:function(e,t,r){"use strict";r.d(t,"a",function(){return d});var o,n=r(1),a=r.n(n),i=r(16),s=r(3),l=r(1012),u=r(49),c=r.n(u);r(1539);var d=Object(i.observer)(o=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.data,r=e.queryItem,o=e["data-tid"],n=e.className,i=r.getFormat();return a.a.createElement(s.Container,{gutter:[0,1],className:n,"data-tid":o},a.a.createElement(l.a,{value:c.a.enforceNumericShaping(c.a.enforceTextDirection(t),"string"==typeof t),format:i}))},t}(n.Component))||o},1539:function(e,t,r){var o=r(1540);"string"==typeof o&&(o=[[e.i,o,""]]);var n={hmr:!0,transform:void 0};r(36)(o,n);o.locals&&(e.exports=o.locals)},1540:function(e,t,r){(e.exports=r(32)(void 0)).push([e.i,".bi-mui-grid__cell{text-align:left}.bi-mui-grid__cell.is-measure,[dir=rtl] .bi-mui-grid__cell{text-align:right}[dir=rtl] .bi-mui-grid__cell.is-measure{text-align:left}",""])},1541:function(e,t,r){"use strict";r.d(t,"a",function(){return y});var o,n,a,i=r(1),s=r.n(i),l=r(16),u=r(3),c=r(25),d=r(94);var p=u.sortTypes.ASC,m=u.sortTypes.DESC,h=u.sortTypes.NO_SORT,g=((o={})[p]=d.a,o[m]=d.b,o[h]=d.c,o),f=((n={})[d.a]=p,n[d.b]=m,n[d.c]=h,n),y=Object(l.observer)(a=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.queryItem,r=e.sortType,o=e.sortPriority,n=e.sortedCol,a=e.isSorting,i=e.col,l=e.onSortChange,d=e.setSelection,p=r.has(i)?r.get(i):"",m=Object.keys(o).length>1&&o[i]?o[i]:"";return s.a.createElement(u.Container,{width:"100%",height:"100%",gutter:[0,1],"data-tid":"sortHeaderCol"+i},s.a.createElement(u.FlexLayout,{width:"100%",height:"100%",justifyContent:"flex-end"},s.a.createElement(u.FlexItem,null,s.a.createElement(u.GridSortCell,{onSortChange:function(e){return l(i,g[e])},sortType:f[p],col:i,priority:m,"data-tid":Object(c.a)("gridSortCell",p),isSorting:a,sortedCol:n,onSortMenu:function(){d&&d([t])}}))))},t}(i.Component))||a},1542:function(e,t,r){var o=r(1543);"string"==typeof o&&(o=[[e.i,o,""]]);var n={hmr:!0,transform:void 0};r(36)(o,n);o.locals&&(e.exports=o.locals)},1543:function(e,t,r){(e.exports=r(32)(void 0)).push([e.i,".bi-mui-dataGrid{border:1px solid #eaeaea}",""])},736:function(e,t,r){var o=r(264);e.exports=function(e,t){return o(e,t)}},775:function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return G});var o,n,a,i,s,l,u,c,d,p,m,h,g,f,y=r(736),b=r.n(y),v=r(54),_=r.n(v),E=r(0),S=r.n(E),w=r(6),D=r(5),C=r(2),O=r(42),P=r(262),x=r(10),I=r(4),j=r(73),R=r(1011);function F(e,t,r,o){r&&Object.defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(o):void 0})}function M(e,t){for(var r=0;r0&&(y.projections=[{identifier:b.getIdentifier(),sort:_[0].getOrder(),aggregate:"maximum"}])}}return y.queryItems.forEach(function(e){return e.getExpression()}),y.querySubject.getFilter().forEach(function(e){return e.getExpression()}),y}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var r=t.prototype;return r.storeDidMount=function(){var e=this;this.reaction(function(){return Object(R.a)(e.module).dirtyPointer},function(){return e.updateParamValues()})},r.storeWillUnmount=function(){var e;null==(e=this.promptAbort)||e.call(this)},r.addColumnData=function(e,t){e.length&&e[0].length&&(!this.columns||t?this.columns=e:this.columns=this.columns.map(function(t,r){return t.concat(e[r])}))},r.addRowData=function(e,t){e&&e.length&&this.addColumnData(this._transpose(e),t)},r.retrieveDSSData=function(e,t,r){this.addRowData(Object(j.a)(e,t),r)},r.updateSortInfo=function(e,t){""!==t?this.sortType.set(e,t):this.sortType.delete(e)},r.clearGrid=function(){this.hasMoreData=!0,this.fetched=!1,this.columns=null},r._getQueryItemSortOrder=function(e){return this.sortType&&this.sortType.has(e)?[{operation:"order",sort:{type:this.sortType.get(e),priority:this.sortPriority&&this.sortPriority[e]?this.sortPriority[e]:1}}]:[]},r._createDataOptions=function(){var e=this,t=[];return{limit:100,type:"detail",offset:this.isSorting?0:this.rowCount,intent:this.intent,dataItems:this.queryItems.map(function(r,o){var n=String(o);return t.push(n),{id:n,itemId:r.getIdForExpression(),selection:e._getQueryItemSortOrder(o)}}),projections:t,writeNumbersAsString:!0}},r._fetchGridData=function(e,t,r){var o=this;void 0===e&&(e=!0);var n=this._createDataOptions(),a=JSON.stringify(n),i=!!this.provider.getBaseURLModule(),s=this.provider.setParameterResponse&&this.provider.setParameterFault;return Object(P.a)(this.context,{querySpec:a,type:this.type,moduleId:i?null:this.moduleId,moduleURL:i?this.moduleId:null,refreshmd:e,rawResponse:!0,querySubjectId:this.querySubject.getIdForExpression(),module:this.module,onParameterResponse:s?function(e){o.action(function(){var t;o.haveActiveParameterFault=!1,null==(t=o.provider)||null==t.setParameterResponse||t.setParameterResponse(e),o.provider.setParameterFault(void 0)})}:void 0,onParameterFault:s?function(e,t,r,n){o.action(function(){o.haveActiveParameterFault=!0,o.provider.handleParameter?(o.paramResolver=function(){return o.action(function(){return o.isLoading=!0,o.saveSession(!0).then(r)})},o.promptAbort=n,o.provider.setParameterResponse(e),o.provider.setParameterFault(t),o.provider.handleParameter()):t.length&&o.provider.openDialog(x.s,{resolve:r,abort:n,parameterResponse:e,parameterFault:t})})}:void 0}).then(function(e){o.action(function(){o.promptParamValuesUpdated=!1,o.isLoading=!1,o.paramResolver=o.promptAbort=null,t(e)})},function(e){o.action(function(){o.promptParamValuesUpdated=!1,o.isLoading=!1,o.paramResolver=o.promptAbort=null,r(e)})})},r.openDataErrorDialog=function(){return this.provider.openDialog(x.f,{data:this.errors})},r.saveSession=function(e){var t;void 0===e&&(e=!1);var r=e||this.dirty;if(this.provider.isGlobalSession(this.moduleId))t=this.provider.saveGlobalSessionModule(r);else if(r){var o=this.provider.getBaseURLModule();t=o?Object(O.f)(this.context,this.module,this.moduleId,o):Object(O.d)(this.context,this.module,this.moduleId)}else t=Promise.resolve();return t},r.fetchData=function(){var e=this;if(this.isUnmounted||(!this.hasMoreData||this.isLoading)&&!this.errors.length)return null;this.errors=[],this.isLoading=!0,this.promptParamValuesUpdated=!1;var t=function(t){return e.action(function(){e.initialLoad=!1,e.isLoading=!1,e.hasMoreData=!1,t.data&&t.data.errors&&t.data.errors.length?e.errors=t.data.errors:e.errors=[q]})};return this.saveSession().then(function(r){return e._fetchGridData(!r||!r.noSessionSave,function(t){var r=t.data,o=r.data,n=r.dataItems,a=r.hasNext;return e.action(function(){e.initialLoad=!1,e.fetched=!0,e.dirty=!1,e.isLoading=!1,e.retrieveDSSData(o,n),e.hasMoreData=a,e.errors=[]})},t)},t)},r.refreshForPrompts=function(){this.haveActiveParameterFault=!1,this.paramResolver?this.paramResolver():this.fetchData()},r.updateParamValues=function(){this.errors=[],this.isLoading=!1,this.dirty=!0,this.promptParamValuesUpdated=!0,this.key=_()(),this.haveActiveParameterFault=!0,this.clearGrid()},r.sortData=function(e,t){var r=this;this.isLoading=!0,this.isSorting=!0,this.sortedCol=e,this.updateSortInfo(e,t);var o=Array.from(this.sortType.entries()),n=function(e){return r.action(function(){r.fetched=!0,r.isLoading=!1,r.isSorting=!1,r.hasMoreData=!1,e.data&&e.data.errors&&e.data.errors.length?r.errors=e.data.errors:r.errors=[q]})};return this.provider.saveGlobalSessionModule().then(function(){return r._fetchGridData(!0,function(e){var t=e.data,n=t.data,a=t.dataItems,i=t.hasNext;return r.action(function(){r.errors=[],b()(o,Array.from(r.sortType.entries()))&&(r.retrieveDSSData(n,a,!0),r.hasMoreData=i,r.isLoading=!1,r.isSorting=!1,r.key=_()())})},n)},n)},r.showGlobalContextMenu=function(e,t,r){this.provider.showContextMenu(this,"modelGridGlobal",{activeElement:r,module:this.module},e,t)},function(e,t,r){t&&M(e.prototype,t),r&&M(e,r)}(t,[{key:"colCount",get:function(){return this.queryItems.length}},{key:"rowCount",get:function(){return this.columns&&this.columns.length>0?this.columns[0].length:0}},{key:"columnLabels",get:function(){return this.queryItems?this.queryItems.map(function(e){return e.getLabel()}):[]}},{key:"sortPriority",get:function(){var e=[],t=1;return this.sortType.forEach(function(r,o){e[o]=t,t+=1}),e}},{key:"hasPromptParam",get:function(){return!!this.paramResolver}},{key:"showParameterMessage",get:function(){return this.haveActiveParameterFault}}]),t}(D.a),g.defaultProvider={isGlobalSession:function(){return!1}},n=T((o=f).prototype,"key",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return _()()}}),a=T(o.prototype,"sortType",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new w.ObservableMap}}),i=T(o.prototype,"isSorting",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),s=T(o.prototype,"isLoading",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),l=T(o.prototype,"initialLoad",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),u=T(o.prototype,"columnNames",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c=T(o.prototype,"columns",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),d=T(o.prototype,"fetched",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),p=T(o.prototype,"errors",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),m=T(o.prototype,"promptParamValuesUpdated",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),T(o.prototype,"columnLabels",[w.computed],Object.getOwnPropertyDescriptor(o.prototype,"columnLabels"),o.prototype),T(o.prototype,"sortPriority",[w.computed],Object.getOwnPropertyDescriptor(o.prototype,"sortPriority"),o.prototype),T(o.prototype,"hasPromptParam",[w.computed],Object.getOwnPropertyDescriptor(o.prototype,"hasPromptParam"),o.prototype),h=T(o.prototype,"haveActiveParameterFault",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),T(o.prototype,"showParameterMessage",[w.computed],Object.getOwnPropertyDescriptor(o.prototype,"showParameterMessage"),o.prototype),T(o.prototype,"openDataErrorDialog",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"openDataErrorDialog"),o.prototype),T(o.prototype,"saveSession",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"saveSession"),o.prototype),T(o.prototype,"fetchData",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"fetchData"),o.prototype),T(o.prototype,"refreshForPrompts",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"refreshForPrompts"),o.prototype),T(o.prototype,"updateParamValues",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"updateParamValues"),o.prototype),T(o.prototype,"sortData",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"sortData"),o.prototype),T(o.prototype,"showGlobalContextMenu",[D.c],Object.getOwnPropertyDescriptor(o.prototype,"showGlobalContextMenu"),o.prototype),o)},821:function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return k});var o,n,a,i=r(1),s=r.n(i),l=r(738),u=r(16),c=r(0),d=r.n(c),p=r(3),m=(r(1211),r(165)),h=r.n(m),g=r(301),f=r.n(g),y=r(34),b=r(17),v=r(19),_=r(25),E=r(7),S=r(5),w=r(63),D=r(2),C=r(275),O=r(277),P=r(73),x=r(37),I=r(39),j=r(1451),R=r(1454),F=r(1541);r(1542);var M=170,L=9.5,T=b.getContentLocale,q=b.getProductLocale,G=Object(p.itemDnD)(j.a,{dragItemType:w.b}),A=function(e){var t=e.title,r=e.body;return s.a.createElement(v.TextIcon,{className:"data-grid__no-data",overflow:"auto"},s.a.createElement(v.TextIcon.Header,null,s.a.createElement(p.FlexLayout,null,s.a.createElement(p.FlexItem,{gutter:[0,1,0,0]},s.a.createElement(p.FlexLayout,null,s.a.createElement(p.SVGIcon,{icon:h.a.id,size:"normal",intent:"danger"}))),s.a.createElement(p.FlexItem,{alignSelf:"center"},t))),s.a.createElement(v.TextIcon.Body,{maxWidth:250},r))},k=Object(p.withContext)()(o=Object(S.e)(function(e,t){var r=("showHiddenColumns"in t?t.showHiddenColumns:t.context.featureConfig[E.HIDDEN_ITEMS])?e.queryItems:e.queryItems.filter(function(e){return!e.isHidden()});return{initialLoad:e.initialLoad,isSorting:e.isSorting,visibleQueryItems:r,selectedColumns:(t.selection||[]).reduce(function(e,t){var o=r.indexOf(t);return-1!==o&&e.push(o),e},[]),fetchData:e.fetchData,sortData:e.sortData,openDataErrorDialog:e.openDataErrorDialog,querySubject:e.querySubject,columns:e.columns,initialIndex:e.initialIndex,hasMoreData:e.hasMoreData,isLoading:e.isLoading,fetched:e.fetched,promptParamValuesUpdated:e.promptParamValuesUpdated,queryItems:e.queryItems,errors:e.errors,rowCount:e.rowCount,gridKey:e.key,sortType:e.sortType,sortPriority:e.sortPriority,sortedCol:e.sortedCol,showGlobalContextMenu:e.showGlobalContextMenu,showParameterMessage:e.showParameterMessage,refreshForPrompts:e.refreshForPrompts}})(o=Object(O.a)(function(e){return!1!==e.active})(o=Object(u.observer)((a=n=function(e){function t(){for(var t,r=arguments.length,o=new Array(r),n=0;ne?Object(P.d)(a[r][e]):"",queryItem:i[r],"data-tid":"gridCell"+r+"_"+e,className:i[r].getUsage()===d.a.UsageType.FACT?"bi-mui-grid__cell is-measure":"bi-mui-grid__cell"}))},t._onGridMenuShow=function(e,r){t.props.showGlobalContextMenu&&t.props.showGlobalContextMenu(e,r,document.activeElement)},t._onHeaderMenuShow=function(e,r,o,n){if(t.props.showContextMenu){var a=t.props,i=a.sortData,s=a.sortType,l=a.visibleQueryItems,u=a.setSelection,c=a.showContextMenu,d=[l[n]];u&&u(d),c&&c(e,r,d,i,s,t._getDataCol(n),document.activeElement)}},t._onOptionRowClick=function(e){t.setState(function(t){return{selectedRow:t.selectedRow===e?null:e}})},t._getColumnWidth=function(e,r){var o=t.props,n=o.useRowOptionsColumn,a=o.columns,i=o.queryItems,s=e-(n?1:0);if(!r[s]&&(r[s]=M,a&&Object(y.j)(i[s]))){var l=a[s].length,u=a[s][0]||"",c=a[s][l-1]||"",d=Math.max(u.length,c.length);r[s]=Math.max(L*d,M)}return r[s]},t._ref=function(e){t._grid=e},t._refreshGridRenderer=function(){return s.a.createElement(v.PanelMessage,null,Object(D.getString)("dataWillAppearHere"),s.a.createElement(p.VSpacer,{size:2}),s.a.createElement(p.Button,{label:Object(D.getString)("refresh"),onClick:t._initialFetch,"data-tid":Object(_.a)("grid","refresh")}))},t._noDataRenderer=function(){return s.a.createElement(v.PanelMessage,null,s.a.createElement(A,{title:Object(D.getString)("noDataAvailable"),body:Object(D.getString)("noDataToView")}))},t._errorRenderer=function(){var e=t.props.errors,r=e.length?e[0].code:null;return s.a.createElement(v.PanelMessage,{topOffset:80,gutter:[6,0,0,0]},s.a.createElement(A,{title:Object(D.getString)("grid_cannotPreviewData"),body:Object(D.getString)("grid_errorLoadingData")}),e&&"QF-892"!==r||"QF-888"!==r||s.a.createElement(A,{title:Object(D.getString)("grid_cannotPreviewData"),body:Object(D.getString)("grid_errorLoadingData")}),e.length&&"QF-892"!==r&&"QF-888"!==r&&s.a.createElement(p.FlexLayout,{justifyContent:"center"},s.a.createElement(p.FlexItem,null,s.a.createElement(p.Link,{"data-tid":Object(_.a)("DataGrid","viewDetailsLink"),onClick:function(){return t.props.openDataErrorDialog(e.slice())},ref:function(e){return t._errorDetails=e}},Object(D.getString)("reactErrorDetails"))),s.a.createElement(p.FlexItem,{gutter:[0,0,0,2]},s.a.createElement(p.Link,{"data-tid":Object(_.a)("DataGrid","tryAgainLink"),onClick:t._initialFetch},Object(D.getString)("tryAgain")))))},t._parameterMessageRenderer=function(){return s.a.createElement(v.PanelMessage,{topOffset:80,gutter:[6,0,0,0]},s.a.createElement(p.FlexLayout,{justifyContent:"center",direction:"column"},s.a.createElement(p.FlexItem,null,s.a.createElement(A,{title:Object(D.getString)("grid_hasPrompt"),body:Object(D.getString)("grid_hasPrompt_body")})),s.a.createElement(p.FlexItem,null,s.a.createElement(p.Button,{label:Object(D.getString)("refresh"),onClick:t.props.refreshForPrompts,"data-tid":Object(_.a)("grid","refresh")}))))},t._panelMessageRenderer=function(){var e=t.props,r=e.errors,o=e.initialLoad,n=e.showParameterMessage,a=r.length>0;return Object(I.a)(x.PARAM_FLAG)&&n?t._parameterMessageRenderer():a?t._errorRenderer():t._shouldShowRefreshGrid()?t._refreshGridRenderer():t._isEmpty()&&!o?t._noDataRenderer():null},t._shouldShowRefreshGrid=function(){var e=t.props,r=e.isLoading,o=e.fetched;return e.manualRefresh&&!r&&!o},t._isEmpty=function(){var e=t.props,r=e.isLoading,o=e.rowCount;return!r&&0===o},t._isSortEnabled=function(){return t.props.enableSort&&!t._isEmpty()},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this.props,t=e.columns,r=e.manualRefresh;t||r||this._initialFetch()},r.componentWillReceiveProps=function(e){var t=e.gridKey,r=e.fetched,o=e.manualRefresh,n=e.columns,a=e.errors,i=e.querySubject,s=e.fetchData,l=e.active,u=e.promptParamValuesUpdated;if(l&&(t!==this.props.gridKey||!r)&&!o){if(u&&Object(I.a)(x.PARAM_FLAG))return;n||0!==a.length||(s(),i!==this.props.querySubject&&this.setState({selectedRow:null}))}},r.componentDidUpdate=function(e){var t=this.props,r=t.initialIndex,o=t.selectedColumns,n=t.initialLoad,a=t.isSorting,i=e.initialLoad,s=e.isSorting,l=n!==i,u=!a&&a!==s;this._grid&&(r>0?this._grid.setColumnScrollIndex({index:r}):o.length>0&&(l||u||!n&&o[0]!==e.selectedColumns[0])&&this._grid.setColumnScrollIndex({index:o[0]}))},r.render=function(){var e=this,t=this.props,r=t.showHeader,o=t.visibleQueryItems,n=t.selectedColumns,a=t.gridKey,i=t.rowCount,u=t.isLoading,c=t.errors,d=t.manualRefresh,m=t.initialHeadersVisible,h=t.enableContextMenu,g=t.useRowOptionsColumn,y=t.initialLoad,b=t.showParameterMessage,_=this.state.selectedRow,E=o.length,S=T()||q(),w=[],D=0;r&&(D=1,this._isSortEnabled()&&(D+=1));var C=y&&!d&&!m&&!b,O=!C&&u&&!b;return s.a.createElement(p.Container,{height:"100%",width:"100%",className:"bi-mui-dataGrid"},s.a.createElement(p.FlexLayout,{fullHeight:!0,direction:"column","data-tid":this.props["data-tid"],"data-tinstance":a},E>0&&s.a.createElement(p.FlexItem,{grow:!0},C?s.a.createElement(v.PanelMessage,null,s.a.createElement(p.ProgressIndicator,{variant:"circle",size:"large"})):s.a.createElement(l.c,{locale:S,defaultLocale:S},s.a.createElement(p.Grid,{ref:this._ref,key:a,getMoreData:this._fetchMoreData,numColumns:E,numRows:c.length?0:i,fixedRows:D,fixedRowCellRenderer:this._headerRenderer,dataCellRenderer:this._dataRenderer,onFixedCornerCellMenu:h?this._onGridMenuShow:null,onFixedRowCellMenu:h?this._onHeaderMenuShow:this.props.onHeaderContextMenu,fixedCornerCellMenuIcon:f.a,selectedColumns:n,selectedRows:_>=0?[_]:[],onOptionRowClick:this._onOptionRowClick,useRowOptionsColumn:g&&!this._isEmpty(),autoMeasureRowHeight:!0,columnWidth:function(t){return e._getColumnWidth(t,w)}}))),O&&s.a.createElement(p.FlexItem,null,s.a.createElement(p.ProgressIndicator,{variant:"bar"}))),this._panelMessageRenderer())},t}(i.Component),n.defaultProps={selection:[],manualRefresh:!1,enableSort:!1,showHeader:!0,enableContextMenu:!1,"data-tid":"gridSection",initialHeadersVisible:!1,useRowOptionsColumn:!0,active:!0},o=a))||o)||o)||o)||o}}]); //# sourceMappingURL=commonAsyncShared__buildQS__grid__pkgEnrich__relationship__sourceSelection.js.map