message: Add runExpression and runCondition functions into SurveyModel class
diff: @@ -32,6 +32,7 @@ import { Question } from "./question";
  import { ItemValue } from "./itemvalue";
  import { PanelModelBase } from "./panel";
  import { HtmlConditionItem } from "./htmlConditionItem";
  +import { ExpressionRunner, ConditionRunner } from "./conditions";
  /**
  * Survey object contains information about the survey. Pages, Questions, flow logic and etc.
  @@ -1174,6 +1175,26 @@ export class SurveyModel extends Base
  public set completedHtmlOnCondition(val: Array<HtmlConditionItem>) {
  this.setPropertyValue("completedHtmlOnCondition", val);
  }
  + /**
  + * Perform the calculation of the given expression and returns the result value
  + * @param expression
  + */
  + public runExpression(expression: string): any {
  + if (!expression) return null;
  + var values = this.getFilteredValues();
  + var properties = this.getFilteredProperties();
  + return new ExpressionRunner(expression).run(values, properties);
  + }
  + /**
  + * Perform the calculation of the given expression and true or false
  + * @param expression
  + */
  + public runCondition(expression: string): boolean {
  + if (!expression) return false;
  + var values = this.getFilteredValues();
  + var properties = this.getFilteredProperties();
  + return new ConditionRunner(expression).run(values, properties);
  + }
  public get renderedCompletedHtml(): string {
  if (this.completedHtmlOnCondition.length == 0) return this.completedHtml;
  var values = this.getFilteredValues();
  @@ -2775,7 +2796,11 @@ export class SurveyModel extends Base
  self.setCompletedState("error", "");
  }
  }
  - self.onSendResult.fire(self, { success: success, response: response, request: request });
  + self.onSendResult.fire(self, {
  + success: success,
  + response: response,
  + request: request
  + });
  },
  this.clientId,
  isPartialCompleted
  