Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "core/CvSearchPane"

Index

Type aliases

CvSearchValueOperator

CvSearchValueOperator: "Equal" | "Not Equal" | "Greater Than" | "Less Than" | "Contains" | "Starts With" | "Ends With"

CvSortDirection

CvSortDirection: "ASC" | "DSC"

Variables

CvSearchPane

CvSearchPane: ClassicComponentClass<CvSearchPaneProps> = React.createClass<CvSearchPaneProps, CvSearchPaneState>({mixins: [CvBaseMixin, CvEditorBase],componentDidMount: function () {this._componentDidMount();},componentWillReceiveProps: function (nextProps, nextContext) {this._componentWillReceiveProps(nextProps, nextContext);},componentWillUnmount: function () {this._componentWillUnmount();},detailsContext: function (nextProps, nextContext) {return this.editorContext(nextProps, nextContext) as DetailsContext;},getDefaultProps: function () {return CvEditorBase._getDefaultProps();},render: function () {const editorContext:EditorContext = this.editorContext();if (editorContext && !editorContext.isDestroyed) {if (this.props.renderer) {return this.props.renderer(this.getChildContext().cvContext);} else if (this.props.detailsRenderer) {if (editorContext.buffer) {return this.props.detailsRenderer(this.getChildContext().cvContext, editorContext.entityRec, this._getSearchCallbackObj());} else {return null;}} else {return null;}} else {return null;}},_getSearchCallbackObj: function ():CvSearchPaneCallback {const editorCallback:CvEditorPaneCallback = this._getCallbackObj();const me:CvSearchPaneCallback = {clearSearchValues: ():void => {this.detailsContext().entityRec.propNames.filter((propName:string)=>{return StringUtil.endsWith(propName, FILTER_OPERATOR_SUFFIX) ||StringUtil.endsWith(propName, FILTER_VALUE_SUFFIX);}).forEach((propName:string)=>{editorCallback.setPropValue(propName, null)});},clearSortValues: ():void => {this.detailsContext().entityRec.propNames.filter((propName:string)=>{return StringUtil.endsWith(propName, SORT_DIRECTION_SUFFIX) ||StringUtil.endsWith(propName, SORT_SEQUENCE_SUFFIX);}).forEach((propName:string)=>{editorCallback.setPropValue(propName, null)});},getSearchValue: (propName):string => {return editorCallback.getPropValueForEdit(propName + FILTER_VALUE_SUFFIX);},getSearchValueOperation: (propName):string => {return editorCallback.getPropValueForEdit(propName + FILTER_OPERATOR_SUFFIX);},getSortValueDirection: (propName):string => {return editorCallback.getPropValueForEdit(propName + SORT_DIRECTION_SUFFIX);},getSortValuePriority: (propName):string => {return editorCallback.getPropValueForEdit(propName + SORT_SEQUENCE_SUFFIX);},isAscending: (propName):boolean => {const dir = me.getSortValueDirection(propName)//server may return ASCENDING or ASC and DSC or DESCENDINGreturn dir && dir.indexOf('A') === 0;},isDescending: (propName):boolean => {const dir = me.getSortValueDirection(propName)//server may return ASCENDING or ASC and DSC or DESCENDINGreturn dir && dir.indexOf('D') === 0;},reopenSearch: (resultCallback?:CvResultCallback<EntityRecDef>):void => {editorCallback.openWriteMode(resultCallback);},setAscending: (propName:string, sortFieldPriority:number=0):void => {me.setSortValue(propName, 'ASC', sortFieldPriority);},setDescending: (propName:string, sortFieldPriority:number=0):void => {me.setSortValue(propName, 'DSC', sortFieldPriority);},setSearchValue: (propName:string, searchValue:string):void => {editorCallback.setPropValue(propName + FILTER_VALUE_SUFFIX, searchValue);},setSearchValueOperation: (propName:string, operator:CvSearchValueOperator):void => {editorCallback.setPropValue(propName + FILTER_OPERATOR_SUFFIX, operator);},setSortValue: (propName:string, sortDirection:CvSortDirection='ASC', sortFieldPriority:number=0):void => {editorCallback.setPropValue(propName + SORT_DIRECTION_SUFFIX, sortDirection);editorCallback.setPropValue(propName + SORT_SEQUENCE_SUFFIX, sortFieldPriority);},submitSearch: (resultCallback?:CvResultCallback<CvNavigationResult>):void => {editorCallback.saveChanges(resultCallback);},/* proxy through the 'base class' methods */clear: ():void => {editorCallback.clear();},getPropValueForDisplay: (propName:string):string => {return editorCallback.getPropValueForDisplay(propName);},getPropValueForEdit: (propName:string):string => {return editorCallback.getPropValueForEdit(propName);},openReadMode: (resultCallback?:CvResultCallback<EntityRecDef>):void => {editorCallback.openReadMode(resultCallback);},openWriteMode: (resultCallback?:CvResultCallback<EntityRecDef>):void => {editorCallback.openWriteMode(resultCallback);},refresh: ()=> {editorCallback.refresh();},saveChanges: (resultCallback?:CvResultCallback<CvEvent<CvNavigationResult>>, navTarget?:string):void => {editorCallback.saveChanges(resultCallback, navTarget);},setBinaryPropWithDataUrl: (name:string, dataUrl:string) => {editorCallback.setBinaryPropWithDataUrl(name, dataUrl);},setBinaryPropWithEncodedData: (name:string, encodedData:string) => {editorCallback.setBinaryPropWithEncodedData(name, encodedData);},setPropValue: (name:string, value:any) => {editorCallback.setPropValue(name, value);},suppressEvents: (suppressEvents:boolean)=>{ editorCallback.suppressEvents(suppressEvents); }}return me;},})

Render a Search Model

FILTER_OPERATOR_SUFFIX

FILTER_OPERATOR_SUFFIX: string = "_FILTER_OPER"

FILTER_VALUE_SUFFIX

FILTER_VALUE_SUFFIX: string = "_FILTER_VALUE"

SORT_DIRECTION_SUFFIX

SORT_DIRECTION_SUFFIX: string = "_SORT_DIRECTION"

SORT_SEQUENCE_SUFFIX

SORT_SEQUENCE_SUFFIX: string = "_SORT_SEQUENCE"

Generated using TypeDoc