@easyquery/core 7.2.0-rc03 → 7.2.0-rc04
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.
- package/dist/bundles/easyquery.core.js +40 -1
- package/dist/bundles/easyquery.core.js.map +1 -1
- package/dist/bundles/easyquery.core.min.js +1 -1
- package/dist/bundles/easyquery.core.min.js.map +1 -1
- package/dist/lib/common/eq_services.d.ts +5 -0
- package/dist/lib/common/eq_services.js +14 -0
- package/dist/lib/common/eq_services.js.map +1 -1
- package/dist/lib/main/context.js +5 -1
- package/dist/lib/main/context.js.map +1 -1
- package/dist/lib/main/context_options.d.ts +2 -0
- package/dist/lib/main/model_loader.js.map +1 -1
- package/dist/lib/main/model_storage.d.ts +13 -0
- package/dist/lib/main/model_storage.js +18 -0
- package/dist/lib/main/model_storage.js.map +1 -0
- package/dist/lib/public_api.d.ts +1 -0
- package/dist/lib/public_api.js +1 -0
- package/dist/lib/public_api.js.map +1 -1
- package/dist/lib/utils/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -3164,6 +3164,7 @@ __webpack_require__.d(__webpack_exports__, "Operand", function() { return /* ree
|
|
|
3164
3164
|
__webpack_require__.d(__webpack_exports__, "EqValueEditor", function() { return /* reexport */ EqValueEditor; });
|
|
3165
3165
|
__webpack_require__.d(__webpack_exports__, "EqAction", function() { return /* reexport */ EqAction; });
|
|
3166
3166
|
__webpack_require__.d(__webpack_exports__, "EqModelLoader", function() { return /* reexport */ EqModelLoader; });
|
|
3167
|
+
__webpack_require__.d(__webpack_exports__, "InMemoryModelStorage", function() { return /* reexport */ model_storage_InMemoryModelStorage; });
|
|
3167
3168
|
__webpack_require__.d(__webpack_exports__, "BrowserQueryStorage", function() { return /* reexport */ query_storage_BrowserQueryStorage; });
|
|
3168
3169
|
__webpack_require__.d(__webpack_exports__, "EqContext", function() { return /* reexport */ context_EqContext; });
|
|
3169
3170
|
__webpack_require__.d(__webpack_exports__, "Widget", function() { return /* reexport */ widget_Widget; });
|
|
@@ -7359,6 +7360,7 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
7359
7360
|
this.httpClient = new public_api["f" /* HttpClient */]();
|
|
7360
7361
|
this.httpClient.defaultHeaders['x-eqjs-version'] = '7.2.0';
|
|
7361
7362
|
this.modelResolver = function (_) { return new data_model_DataModel(); };
|
|
7363
|
+
this.modelStorageResolver = null;
|
|
7362
7364
|
this.queryResolver = function (context) { return new query_Query(context.getModel()); };
|
|
7363
7365
|
this.modelLoaderResolver = function (context) { return new EqServerModelLoader(context); };
|
|
7364
7366
|
this.queryStorageResolver = function (context) { return new query_storage_BrowserQueryStorage(context); };
|
|
@@ -7369,6 +7371,7 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
7369
7371
|
this.aggrCalculatoResolver = function (context) { return new DefaultAggregatesCalculator(context); };
|
|
7370
7372
|
}
|
|
7371
7373
|
EqServiceProvider.prototype.reset = function () {
|
|
7374
|
+
this.modelStorage = null;
|
|
7372
7375
|
this.modelLoader = null;
|
|
7373
7376
|
this.queryStorage = null;
|
|
7374
7377
|
this.querySynchronizer = null;
|
|
@@ -7397,6 +7400,15 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
7397
7400
|
}
|
|
7398
7401
|
return this.modelLoader;
|
|
7399
7402
|
};
|
|
7403
|
+
EqServiceProvider.prototype.getModelStorage = function () {
|
|
7404
|
+
if (!this.modelStorage) {
|
|
7405
|
+
if (!this.modelStorageResolver) {
|
|
7406
|
+
throw 'ModelStorageResolver is not defined';
|
|
7407
|
+
}
|
|
7408
|
+
this.modelStorage = this.modelStorageResolver(this.context);
|
|
7409
|
+
}
|
|
7410
|
+
return this.modelStorage;
|
|
7411
|
+
};
|
|
7400
7412
|
EqServiceProvider.prototype.getQueryStorage = function () {
|
|
7401
7413
|
if (!this.queryStorage) {
|
|
7402
7414
|
if (!this.queryStorageResolver) {
|
|
@@ -7460,6 +7472,9 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
7460
7472
|
EqServiceProvider.prototype.registerModelLoaderResolver = function (resolver) {
|
|
7461
7473
|
this.modelLoaderResolver = resolver;
|
|
7462
7474
|
};
|
|
7475
|
+
EqServiceProvider.prototype.registerModelStorageResolver = function (resolver) {
|
|
7476
|
+
this.modelStorageResolver = resolver;
|
|
7477
|
+
};
|
|
7463
7478
|
EqServiceProvider.prototype.registerQueryStorageResolver = function (resolver) {
|
|
7464
7479
|
this.queryStorageResolver = resolver;
|
|
7465
7480
|
};
|
|
@@ -7573,6 +7588,25 @@ var EqAction;
|
|
|
7573
7588
|
EqAction["UploadQueryFile"] = "UploadQueryFile";
|
|
7574
7589
|
})(EqAction || (EqAction = {}));
|
|
7575
7590
|
|
|
7591
|
+
// CONCATENATED MODULE: ./src/main/model_storage.ts
|
|
7592
|
+
|
|
7593
|
+
var model_storage_InMemoryModelStorage = /** @class */ (function () {
|
|
7594
|
+
function InMemoryModelStorage(models) {
|
|
7595
|
+
this.models = [];
|
|
7596
|
+
if (models) {
|
|
7597
|
+
public_api["l" /* utils */].assign(this.models, [], models);
|
|
7598
|
+
}
|
|
7599
|
+
}
|
|
7600
|
+
InMemoryModelStorage.prototype.getModels = function () {
|
|
7601
|
+
var _this = this;
|
|
7602
|
+
return new Promise(function (resolve, reject) {
|
|
7603
|
+
resolve(_this.models);
|
|
7604
|
+
});
|
|
7605
|
+
};
|
|
7606
|
+
return InMemoryModelStorage;
|
|
7607
|
+
}());
|
|
7608
|
+
|
|
7609
|
+
|
|
7576
7610
|
// CONCATENATED MODULE: ./src/main/action.ts
|
|
7577
7611
|
var EqActionResult;
|
|
7578
7612
|
(function (EqActionResult) {
|
|
@@ -7874,10 +7908,14 @@ var context_EqContext = /** @class */ (function () {
|
|
|
7874
7908
|
}
|
|
7875
7909
|
if (options.endpoint) {
|
|
7876
7910
|
this.baseEndpoint = options.endpoint;
|
|
7877
|
-
console.warn('The `endpoint` option is deprecated
|
|
7911
|
+
console.warn('The `endpoint` option is deprecated.\n'
|
|
7878
7912
|
+ 'Please use `context.useEndpoint(endpointURL)` function instead.');
|
|
7879
7913
|
}
|
|
7880
7914
|
this.setDefaultEndpoints(this.baseEndpoint);
|
|
7915
|
+
if (options.modelStorageResolver) {
|
|
7916
|
+
var eqServices = this.getServices();
|
|
7917
|
+
eqServices.registerModelStorageResolver(options.modelStorageResolver);
|
|
7918
|
+
}
|
|
7881
7919
|
this.loadQueryOnStart = false;
|
|
7882
7920
|
if (options.loadQueryOnStart) {
|
|
7883
7921
|
this.loadQueryOnStart = options.loadQueryOnStart;
|
|
@@ -9211,6 +9249,7 @@ addEasyQueryCoreTexts();
|
|
|
9211
9249
|
|
|
9212
9250
|
|
|
9213
9251
|
|
|
9252
|
+
|
|
9214
9253
|
|
|
9215
9254
|
|
|
9216
9255
|
//for backward compatibility
|