@easyquery/enterprise 7.2.1-rc03 → 7.2.1-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/browser/eq.enterprise.js +86 -35
- package/dist/browser/eq.enterprise.js.map +1 -1
- package/dist/browser/eq.enterprise.min.js +2 -2
- package/dist/browser/eq.enterprise.min.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.js +82 -27
- package/dist/bundles/easyquery.enterprise.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.min.js +1 -1
- package/dist/bundles/easyquery.enterprise.min.js.map +1 -1
- package/dist/lib/extensions.js +12 -7
- package/dist/lib/extensions.js.map +1 -1
- package/dist/lib/license/lc-dialog.d.ts +1 -0
- package/dist/lib/license/lc-dialog.js +52 -2
- package/dist/lib/license/lc-dialog.js.map +1 -1
- package/dist/lib/utils/lcv.js.map +1 -1
- package/package.json +2 -2
|
@@ -207,7 +207,7 @@ Math.trunc = Math.trunc || function (x) {
|
|
|
207
207
|
}
|
|
208
208
|
return Math.ceil(x);
|
|
209
209
|
};
|
|
210
|
-
var
|
|
210
|
+
var lcv_lcv = {
|
|
211
211
|
__kt: 0,
|
|
212
212
|
ck: function (key) {
|
|
213
213
|
if (!key || !key.length) {
|
|
@@ -228,23 +228,23 @@ var lcv = {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
if (!ism) {
|
|
231
|
-
|
|
231
|
+
lcv_lcv.__kt = -1;
|
|
232
232
|
}
|
|
233
233
|
var idx = minVer % 4;
|
|
234
234
|
var shift = majVer + minVer;
|
|
235
235
|
if (part2[6 + idx] != encChar(shift, 19)) {
|
|
236
|
-
|
|
236
|
+
lcv_lcv.__kt = -2;
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
if (part2[1] != encChar(infoBytes[3])) {
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
if (
|
|
242
|
+
lcv_lcv.__kt = part2[3] != encChar(infoBytes[5]) ? 2 : 3;
|
|
243
|
+
if (lcv_lcv.__kt === 2) {
|
|
244
244
|
var eds = "" + f36(part2.substring(4, 6) + part2.substring(10));
|
|
245
245
|
var ed = new Date(2000 + Number.parseInt(eds.substring(0, 2)), Number.parseInt(eds.substring(2, 4)) - 1, Number.parseInt(eds.substring(4)), 0, 0, 0, 0);
|
|
246
246
|
if (Date.now() > ed.getTime()) {
|
|
247
|
-
|
|
247
|
+
lcv_lcv.__kt = 1;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -345,7 +345,7 @@ var condition_ex_ConditionEx = /** @class */ (function (_super) {
|
|
|
345
345
|
};
|
|
346
346
|
ConditionEx.prototype.loadFromData = function (model, data) {
|
|
347
347
|
_super.prototype.loadFromData.call(this, model, data);
|
|
348
|
-
if (
|
|
348
|
+
if (lcv_lcv.__kt <= 1)
|
|
349
349
|
return;
|
|
350
350
|
if (typeof data.readOnly !== 'undefined') {
|
|
351
351
|
this.setReadOnly(data.readOnly);
|
|
@@ -369,7 +369,7 @@ var condition_ex_ConditionEx = /** @class */ (function (_super) {
|
|
|
369
369
|
};
|
|
370
370
|
ConditionEx.prototype.saveToData = function () {
|
|
371
371
|
var obj = _super.prototype.saveToData.call(this);
|
|
372
|
-
if (
|
|
372
|
+
if (lcv_lcv.__kt <= 1)
|
|
373
373
|
return obj;
|
|
374
374
|
if (this.isReadOnly()) {
|
|
375
375
|
obj.readOnly = this.isReadOnly();
|
|
@@ -430,7 +430,7 @@ var query_column_ex_QueryColumnEx = /** @class */ (function (_super) {
|
|
|
430
430
|
*/
|
|
431
431
|
QueryColumnEx.prototype.loadFromData = function (model, colData) {
|
|
432
432
|
_super.prototype.loadFromData.call(this, model, colData);
|
|
433
|
-
if (
|
|
433
|
+
if (lcv_lcv.__kt <= 2)
|
|
434
434
|
return;
|
|
435
435
|
if (colData) {
|
|
436
436
|
if (typeof colData.readOnly != 'undefined') {
|
|
@@ -440,7 +440,7 @@ var query_column_ex_QueryColumnEx = /** @class */ (function (_super) {
|
|
|
440
440
|
};
|
|
441
441
|
QueryColumnEx.prototype.saveToData = function () {
|
|
442
442
|
var colData = _super.prototype.saveToData.call(this);
|
|
443
|
-
if (
|
|
443
|
+
if (lcv_lcv.__kt <= 2)
|
|
444
444
|
return colData;
|
|
445
445
|
if (this.isReadOnly()) {
|
|
446
446
|
colData.readOnly = this.isReadOnly();
|
|
@@ -475,20 +475,20 @@ var query_ex_QueryEx = /** @class */ (function (_super) {
|
|
|
475
475
|
return _super.call(this, model) || this;
|
|
476
476
|
}
|
|
477
477
|
QueryEx.prototype.isEx = function () {
|
|
478
|
-
return
|
|
478
|
+
return lcv_lcv.__kt > 1;
|
|
479
479
|
};
|
|
480
480
|
QueryEx.prototype.createSubQuery = function () {
|
|
481
481
|
return new QueryEx(this.model);
|
|
482
482
|
};
|
|
483
483
|
QueryEx.prototype.createCondition = function (tag) {
|
|
484
484
|
if (tag === void 0) { tag = external_easyqueryCore_["CondTag"].Simple; }
|
|
485
|
-
if (
|
|
485
|
+
if (lcv_lcv.__kt <= 1)
|
|
486
486
|
return _super.prototype.createCondition.call(this, tag);
|
|
487
487
|
return new condition_ex_ConditionEx(this, tag);
|
|
488
488
|
};
|
|
489
489
|
QueryEx.prototype.createColumn = function (justsorted) {
|
|
490
490
|
if (justsorted === void 0) { justsorted = false; }
|
|
491
|
-
if (
|
|
491
|
+
if (lcv_lcv.__kt <= 1)
|
|
492
492
|
return _super.prototype.createColumn.call(this, justsorted);
|
|
493
493
|
return new query_column_ex_QueryColumnEx(this, justsorted);
|
|
494
494
|
};
|
|
@@ -499,7 +499,7 @@ var query_ex_QueryEx = /** @class */ (function (_super) {
|
|
|
499
499
|
*/
|
|
500
500
|
QueryEx.prototype.addConditionGroup = function (descriptor, addChildCondition) {
|
|
501
501
|
if (addChildCondition === void 0) { addChildCondition = true; }
|
|
502
|
-
if (
|
|
502
|
+
if (lcv_lcv.__kt <= 1)
|
|
503
503
|
return _super.prototype.addConditionGroup.call(this, descriptor, addChildCondition);
|
|
504
504
|
var parent = descriptor.parent || this.getRootCondition();
|
|
505
505
|
var lType = descriptor.linking || (parent.linkType === external_easyqueryCore_["LinkType"].All ? external_easyqueryCore_["LinkType"].Any : external_easyqueryCore_["LinkType"].All);
|
|
@@ -518,7 +518,7 @@ var query_ex_QueryEx = /** @class */ (function (_super) {
|
|
|
518
518
|
QueryEx.prototype.addExtraConditionGroup = function (descriptor, addChildCondition) {
|
|
519
519
|
if (addChildCondition === void 0) { addChildCondition = true; }
|
|
520
520
|
descriptor.parent = descriptor.parent || this.extraConditions;
|
|
521
|
-
if (
|
|
521
|
+
if (lcv_lcv.__kt <= 1)
|
|
522
522
|
return _super.prototype.addExtraConditionGroup.call(this, descriptor, addChildCondition);
|
|
523
523
|
return this.addConditionGroup(descriptor);
|
|
524
524
|
};
|
|
@@ -656,7 +656,7 @@ var model_ex_DataModelEx = /** @class */ (function (_super) {
|
|
|
656
656
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
657
657
|
}
|
|
658
658
|
DataModelEx.prototype.buildQueryPath = function (query) {
|
|
659
|
-
if (
|
|
659
|
+
if (lcv_lcv.__kt <= 1)
|
|
660
660
|
return _super.prototype.buildQueryPath.call(this, query);
|
|
661
661
|
if (this.mainEntity)
|
|
662
662
|
return _super.prototype.buildQueryPath.call(this, query);
|
|
@@ -7610,7 +7610,7 @@ var lc_dialog_LCDialog = /** @class */ (function () {
|
|
|
7610
7610
|
var formBuilder = domel('div');
|
|
7611
7611
|
formBuilder.addChild('div', function (b) { return b
|
|
7612
7612
|
.html('<div style="font-size:1.2em">We sent a confirmation code to <strong>{{email}}</strong>.</div>' +
|
|
7613
|
-
'<div style="font-size:1.2em">Please find it and enter the
|
|
7613
|
+
'<div style="font-size:1.2em">Please find it in the email and enter to the text box below</div>'); });
|
|
7614
7614
|
formBuilder
|
|
7615
7615
|
.addClass('kfrm-form')
|
|
7616
7616
|
.addChild('div', function (b) {
|
|
@@ -7635,7 +7635,7 @@ var lc_dialog_LCDialog = /** @class */ (function () {
|
|
|
7635
7635
|
var formBuilder = domel('div');
|
|
7636
7636
|
formBuilder.addChild('div', function (b) { return b
|
|
7637
7637
|
.html('<div style="font-size:1.2em">You have successfully completed the registration process.</div>' +
|
|
7638
|
-
'<div style="font-size:1.2em">Please restart web application to get the key applied.</div>'); });
|
|
7638
|
+
'<div style="font-size:1.2em">Please restart your web application to get the key applied.</div>'); });
|
|
7639
7639
|
form = formBuilder.toDOM();
|
|
7640
7640
|
return form;
|
|
7641
7641
|
};
|
|
@@ -7726,6 +7726,56 @@ var lc_dialog_LCDialog = /** @class */ (function () {
|
|
|
7726
7726
|
return LCDialog;
|
|
7727
7727
|
}());
|
|
7728
7728
|
|
|
7729
|
+
function showNoLicenseAlert(lcv) {
|
|
7730
|
+
var title, body, buttonTitle, buttonUrl;
|
|
7731
|
+
switch (lcv.__kt) {
|
|
7732
|
+
case 1:
|
|
7733
|
+
title = 'EasyQuery trial has expired';
|
|
7734
|
+
body = "Your trial period for EasyQuery has expired. \n\tYou can send a request to <a href=\"https://korzh.com/account\">extend your trial</a> or <a href=\"https://korzh.com/easyquery/licensing\">buy a license</a> to get rid of all limitations.";
|
|
7735
|
+
buttonTitle = 'Buy a license';
|
|
7736
|
+
buttonUrl = 'https://korzh.com/easyquery/licensing';
|
|
7737
|
+
break;
|
|
7738
|
+
case -3:
|
|
7739
|
+
title = 'No license key for EasyQuery';
|
|
7740
|
+
body = "Please <a href=\"https://korzh.com/easyquery#get-started\">register for a trial</a> \n\tor <a href=\"https://korzh.com/easyquery/licensing\">purchase a license</a> to get a proper product key. <br />\n\tIf you already have a key, please follow <a href=\"https://korzh.com/easyquery/docs/getting-started/product-key\">this guide</a> to apply it.";
|
|
7741
|
+
buttonTitle = 'Register trial';
|
|
7742
|
+
buttonUrl = 'https://korzh.com/easyquery#get-started';
|
|
7743
|
+
break;
|
|
7744
|
+
default:
|
|
7745
|
+
title = "Invalid key for EasyQuery!";
|
|
7746
|
+
body = "The EasyQuery product key is either invalid or was issued for a different version of the library.\n The version you are using now is 7.2,\n\tso please <a href=\"https://korzh.com/account\">login to your account</a> to get a proper key for version 7.2.";
|
|
7747
|
+
buttonTitle = 'Get key';
|
|
7748
|
+
buttonUrl = 'https://korzh.com/account';
|
|
7749
|
+
break;
|
|
7750
|
+
}
|
|
7751
|
+
var ds = new DefaultDialogService();
|
|
7752
|
+
var dlg = ds.open({
|
|
7753
|
+
closable: false,
|
|
7754
|
+
cancelable: false,
|
|
7755
|
+
submitable: false,
|
|
7756
|
+
title: title,
|
|
7757
|
+
body: body
|
|
7758
|
+
});
|
|
7759
|
+
var footer = dlg.getRootElement().querySelector('footer');
|
|
7760
|
+
domel(footer)
|
|
7761
|
+
.removeClass('align-right')
|
|
7762
|
+
.setStyle('justify-content', 'center')
|
|
7763
|
+
.addChild('button', function (b) { return b
|
|
7764
|
+
.addClass('kfrm-button', 'is-info')
|
|
7765
|
+
.addText(buttonTitle)
|
|
7766
|
+
.on('click', function (e) {
|
|
7767
|
+
window.location.href = buttonUrl;
|
|
7768
|
+
}); });
|
|
7769
|
+
if (lcv.__kt == 1) {
|
|
7770
|
+
domel(footer)
|
|
7771
|
+
.addChild('button', function (b) { return b
|
|
7772
|
+
.addClass('kfrm-button')
|
|
7773
|
+
.addText('Extend trial')
|
|
7774
|
+
.on('click', function (e) {
|
|
7775
|
+
window.location.href = 'https://korzh.com/account';
|
|
7776
|
+
}); });
|
|
7777
|
+
}
|
|
7778
|
+
}
|
|
7729
7779
|
|
|
7730
7780
|
// CONCATENATED MODULE: ./src/extensions.ts
|
|
7731
7781
|
|
|
@@ -7742,15 +7792,15 @@ external_easyqueryCore_["EqContext"].prototype.setLicenseKeyEndpoint = function
|
|
|
7742
7792
|
};
|
|
7743
7793
|
external_easyqueryCore_["EqContext"].prototype.useEnterprise = function (keyOrInitCallback) {
|
|
7744
7794
|
var _this = this;
|
|
7745
|
-
var func = function (key) {
|
|
7746
|
-
|
|
7747
|
-
if (
|
|
7795
|
+
var func = function (key, showAlert) {
|
|
7796
|
+
lcv_lcv.ck(key);
|
|
7797
|
+
if (lcv_lcv.__kt > 1) {
|
|
7748
7798
|
var services = _this.getServices();
|
|
7749
7799
|
services.registerDataModelResolver(function (context) { return new model_ex_DataModelEx(); });
|
|
7750
7800
|
services.registerQueryResolver(function (context) { return new query_ex_QueryEx(context.getModel()); });
|
|
7751
7801
|
services.registerQueryStorageResolver(function (context) { return new EqServerQueryStorage(context); });
|
|
7752
7802
|
services.registerAggregatesCalculator(function (context) { return new data_table_aggr_calculator_DataTableAggregatesCalculator(context); });
|
|
7753
|
-
if (
|
|
7803
|
+
if (lcv_lcv.__kt === 2) {
|
|
7754
7804
|
console.warn('EasyQuery.JS is working in the TRIAL MODE!\n'
|
|
7755
7805
|
+ 'Please order a license (https://korzh.com/eq) to get a proper product key.');
|
|
7756
7806
|
createTrialWM();
|
|
@@ -7761,19 +7811,24 @@ external_easyqueryCore_["EqContext"].prototype.useEnterprise = function (keyOrIn
|
|
|
7761
7811
|
}
|
|
7762
7812
|
}
|
|
7763
7813
|
else {
|
|
7764
|
-
|
|
7765
|
-
|
|
7814
|
+
if (showAlert) {
|
|
7815
|
+
showNoLicenseAlert(lcv_lcv);
|
|
7816
|
+
}
|
|
7817
|
+
else {
|
|
7818
|
+
var lcd = new lc_dialog_LCDialog(_this);
|
|
7819
|
+
lcd.show();
|
|
7820
|
+
}
|
|
7766
7821
|
}
|
|
7767
7822
|
};
|
|
7768
7823
|
if (typeof (keyOrInitCallback) === "string") {
|
|
7769
|
-
func(keyOrInitCallback);
|
|
7824
|
+
func(keyOrInitCallback, true);
|
|
7770
7825
|
}
|
|
7771
7826
|
else if (typeof (keyOrInitCallback) === "function") {
|
|
7772
7827
|
var http_1 = this.getServices().getHttpClient();
|
|
7773
7828
|
var url_1 = external_easyqueryCore_["equtils"].combinePath(this.getBaseEndpoint(), 'lck2');
|
|
7774
7829
|
http_1.get(url_1)
|
|
7775
7830
|
.then(function (result) {
|
|
7776
|
-
func(result.key.split("").reverse().join(""));
|
|
7831
|
+
func(result.key.split("").reverse().join(""), false);
|
|
7777
7832
|
_this.useBackend({
|
|
7778
7833
|
type: result.backendType,
|
|
7779
7834
|
subType: result.appType
|
|
@@ -7784,7 +7839,7 @@ external_easyqueryCore_["EqContext"].prototype.useEnterprise = function (keyOrIn
|
|
|
7784
7839
|
url_1 = external_easyqueryCore_["equtils"].combinePath(_this.getBaseEndpoint(), 'lck');
|
|
7785
7840
|
http_1.get(url_1)
|
|
7786
7841
|
.then(function (result) {
|
|
7787
|
-
func(result.split("").reverse().join(""));
|
|
7842
|
+
func(result.split("").reverse().join(""), false);
|
|
7788
7843
|
keyOrInitCallback();
|
|
7789
7844
|
})
|
|
7790
7845
|
.catch(function (error) { return _this.throwError({
|