@easyquery/core 7.2.1-rc02 → 7.2.1-rc03

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7744,6 +7744,10 @@ var context_EqContext = /** @class */ (function () {
7744
7744
  this.loadQueryOnStart = false;
7745
7745
  this.useStoredQueryOnFetch = false;
7746
7746
  this.debugMode = false;
7747
+ this._backendInfo = {
7748
+ type: 'EQN-ANC',
7749
+ subType: 'asp-net-core-razor'
7750
+ };
7747
7751
  //----------- endpoint processing functions --------------
7748
7752
  this.endpointVarsRegex = /\{.*?\}/g;
7749
7753
  this.elasticPaging = false;
@@ -8047,6 +8051,13 @@ var context_EqContext = /** @class */ (function () {
8047
8051
  this.fireEvent('ready');
8048
8052
  }
8049
8053
  };
8054
+ Object.defineProperty(EqContext.prototype, "backendInfo", {
8055
+ get: function () {
8056
+ return this._backendInfo;
8057
+ },
8058
+ enumerable: true,
8059
+ configurable: true
8060
+ });
8050
8061
  /**
8051
8062
  * Sets endpoint for all EasyQuery actions. Should be called before `init` and
8052
8063
  * `useEnterprise` methods
@@ -8064,6 +8075,34 @@ var context_EqContext = /** @class */ (function () {
8064
8075
  this.baseEndpoint = endpoint;
8065
8076
  return this;
8066
8077
  };
8078
+ /**
8079
+ * Allows to specify the type of backend service.
8080
+ *
8081
+ * @param backendInfo - the structure that contains information about the app used on the backend
8082
+ * Possible values for `ptag` property: 'EQN-ANC' - ASP.NET Core or 'EQN-ASP' - for ASP.NET 4 backend
8083
+ */
8084
+ EqContext.prototype.useBackend = function (backendInfo) {
8085
+ if (backendInfo.type) {
8086
+ this._backendInfo.type = backendInfo.type;
8087
+ }
8088
+ if (backendInfo.subType) {
8089
+ this._backendInfo.subType = backendInfo.subType;
8090
+ }
8091
+ else {
8092
+ switch (this._backendInfo.type) {
8093
+ case 'EQN-ANC':
8094
+ this._backendInfo.subType = 'asp-net-core-razor';
8095
+ break;
8096
+ case 'EQN-ASP':
8097
+ this._backendInfo.subType = 'asp-net-4-mvc';
8098
+ break;
8099
+ default:
8100
+ this._backendInfo.subType = 'other';
8101
+ break;
8102
+ }
8103
+ }
8104
+ return this;
8105
+ };
8067
8106
  /**
8068
8107
  * Add a new widget to the context.
8069
8108
  * After that the widget will start to receive messages from other context components.