CvListColumnHeader
CvListColumnHeader: any = React.createClass<{colDef:ColumnDef, searchCallback:CvSearchPaneCallback},{}>({getDefaultProps: function () {return {colDef: null, searchCallback: null}},render: function () {const {colDef, searchCallback} = this.props;const dir = searchCallback.getSortValueDirection(colDef.name);//server may return ASCENDING or ASC and DSC or DESCENDINGconst nextDir = this._isAsc(dir) ? 'DSC' : 'ASC';//size the celllet sizeClass = ' ' + CvListColumnHeader.classForColumnDef(colDef);return <th className={'cv-target' + sizeClass} onClick={((colName)=>{searchCallback.reopenSearch((success, error)=>{searchCallback.clearSortValues();searchCallback.setSortValue(colName, nextDir, 0);searchCallback.submitSearch((success, error)=>{});})}).bind(this, colDef.name)}><span>{colDef.heading}</span>{(()=>{if(dir) {const className = this._isAsc(dir) ?"glyphicon glyphicon-triangle-top cv-sort-dir" : "glyphicon glyphicon-triangle-bottom cv-sort-dir";return <span className={className} aria-hidden="true"/>} else {return null;}})()}</th>},_isAsc: function(dir:string) {return dir && dir.indexOf('A') === 0;},_isDsc: function(dir:string) {return dir && dir.indexOf('D') === 0;},statics : {classForColumnDef:function(colDef:ColumnDef) {if(colDef.propertyDef.presLength > 500) {return 'cv-list-cell-width-xl'}else if(colDef.propertyDef.presLength >= 200) {return 'cv-list-cell-width-lg'}else if(colDef.propertyDef.presLength >= 100) {return 'cv-list-cell-width-md'} else {return 'cv-list-cell-width-default'}}}})
CvListTableHeader
CvListTableHeader: ClassicComponentClass<object> = React.createClass<{searchNavResult:CvNavigationResult, listContext:ListContext},{}>({getDefaultProps: function () {return {searchNavResult: null, listContext: null}},render: function () {const {searchNavResult, listContext} = this.props;return (<thead>{searchNavResult ?(<CvNavigation navigationResult={searchNavResult}><CvForm formContext={searchNavResult.navRequest}><CvSearchPane paneRef={0} detailsRenderer={(cvContext:CvContext,entityRec:EntityRec, callback:CvSearchPaneCallback)=>{return <tr>{[<th key={'select_col'} />].concat(listContext.listDef.activeColumnDefs.map((colDef, i) => {return <CvListColumnHeader colDef={colDef} searchCallback={callback} key={i}/>}))}</tr>}}/></CvForm></CvNavigation>):(<tr>{[<th key="select_col"/>].concat(listContext.listDef.activeColumnDefs.map((colDef, index) => {return <th key={index}>{colDef.heading}</th>}))}</tr>)}</thead>);}})