@easyquery/core 7.2.4-rc03 → 7.2.4-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.
@@ -18,7 +18,7 @@ return /******/ (() => { // webpackBootstrap
18
18
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
19
  /* harmony export */ e: () => (/* binding */ GoogleDataConverter)
20
20
  /* harmony export */ });
21
- /* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(907);
21
+ /* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(902);
22
22
 
23
23
  /**
24
24
  * Represents Google data table class
@@ -196,7 +196,7 @@ var GoogleDataConverter = /** @class */ (function () {
196
196
 
197
197
  /***/ }),
198
198
 
199
- /***/ 907:
199
+ /***/ 902:
200
200
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
201
201
 
202
202
 
@@ -359,39 +359,6 @@ var HttpRequest = /** @class */ (function () {
359
359
  }());
360
360
 
361
361
  //# sourceMappingURL=http_request.js.map
362
- ;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/string_utils.js
363
- function repeatString(str, times) {
364
- var result = "";
365
- for (var i = 0; i < times; i++) {
366
- result += str;
367
- }
368
- return result;
369
- }
370
- function reverseString(str) {
371
- return str.split("").reverse().join("");
372
- }
373
- function strEndsWith(str, symbol) {
374
- return str && str.lastIndexOf(symbol) == (str.length - symbol.length);
375
- }
376
- /**
377
- * Adds two paths and returns the result
378
- * Correctly processes leading and trailing slashes
379
- * @param path1
380
- * @param path2
381
- */
382
- function combinePath(path1, path2) {
383
- var result = path1;
384
- if (result != null && result.length > 0) {
385
- if (result.charAt(result.length - 1) != '/')
386
- result += "/";
387
- result += path2;
388
- }
389
- else {
390
- result = path2;
391
- }
392
- return result;
393
- }
394
- //# sourceMappingURL=string_utils.js.map
395
362
  ;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/i18n/i18n.js
396
363
 
397
364
 
@@ -865,7 +832,6 @@ var i18n;
865
832
  ;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/utils.js
866
833
 
867
834
 
868
-
869
835
  var utils;
870
836
  (function (utils) {
871
837
  function getAllDataTypes() {
@@ -1188,27 +1154,26 @@ var utils;
1188
1154
  if (prfx && prfx.length > 0) {
1189
1155
  prfx += "-";
1190
1156
  }
1191
- //adding 2 random symbols
1192
- var randValue = repeatString("", 2);
1193
- ;
1194
- var maxSymbolIndex = symbols.length - 1;
1195
- randValue = replaceAtString(randValue, 0, symbols[getRandomInt(0, maxSymbolIndex)]);
1196
- randValue = replaceAtString(randValue, 1, symbols[getRandomInt(0, maxSymbolIndex)]);
1197
- //generating main ID part (64-base representation of the current value of the time ticks)
1198
- var ticksNum64 = intToNum36(getNowTicks() - magicTicks);
1199
- return prfx + randValue + ticksNum64;
1157
+ //adding 3 random symbols
1158
+ var randCharPart = symbols[getRandomInt(0, symbols.length)] +
1159
+ symbols[getRandomInt(0, symbols.length)] +
1160
+ symbols[getRandomInt(0, symbols.length)];
1161
+ var randInt = getRandomInt(0, 10000);
1162
+ //generating main ID part
1163
+ //it's a 36-base representation of some random number based on current value of ticks
1164
+ var ticksNum36 = intToNumBase(getNowTicks() - magicTicks - randInt);
1165
+ return prfx + randCharPart + ticksNum36;
1200
1166
  }
1201
1167
  utils.generateId = generateId;
1202
- function intToNum36(value) {
1203
- var targetBase = 36;
1204
- var i = 14;
1205
- var buffer = repeatString("", i);
1168
+ function intToNumBase(value, targetBase) {
1169
+ if (targetBase === void 0) { targetBase = 36; }
1170
+ var buffer = '';
1206
1171
  var rest = value;
1207
1172
  do {
1208
- buffer = replaceAtString(buffer, i--, symbols[rest % targetBase]);
1173
+ buffer = symbols[rest % targetBase] + buffer;
1209
1174
  rest = Math.floor(rest /= targetBase);
1210
1175
  } while (rest > 0);
1211
- return reverseString(buffer.trim());
1176
+ return buffer;
1212
1177
  }
1213
1178
  function squeezeMoniker(str, maxlen) {
1214
1179
  var parts = str.split('-');
@@ -1245,8 +1210,8 @@ var utils;
1245
1210
  return str;
1246
1211
  }
1247
1212
  }
1248
- function replaceAtString(str, index, value) {
1249
- return str.substr(0, index) + value + str.substr(index + value.length);
1213
+ function replaceAtString(str, index, replacement) {
1214
+ return str.substring(0, index) + replacement + str.substring(index + replacement.length);
1250
1215
  }
1251
1216
  function getRandomInt(min, max) {
1252
1217
  return Math.floor(Math.random() * (max - min)) + min;
@@ -3210,8 +3175,8 @@ __webpack_require__.d(__webpack_exports__, {
3210
3175
  versionInfo: () => (/* reexport */ versionInfo)
3211
3176
  });
3212
3177
 
3213
- // EXTERNAL MODULE: ../../easydata/easydata.js/packs/core/dist/lib/public_api.js + 21 modules
3214
- var public_api = __webpack_require__(907);
3178
+ // EXTERNAL MODULE: ../../easydata/easydata.js/packs/core/dist/lib/public_api.js + 20 modules
3179
+ var public_api = __webpack_require__(902);
3215
3180
  ;// CONCATENATED MODULE: ./src/utils/format_parser.ts
3216
3181
  /**
3217
3182
  * Represents a parser for format expressions in operators
@@ -5964,7 +5929,7 @@ var Query = /** @class */ (function () {
5964
5929
  throw new InvalidQueryError(entityAttrNotExistError + column.expr.args[0].value);
5965
5930
  }
5966
5931
  }
5967
- else if (column.expr.tag !== ExprTag.CustomSql) {
5932
+ else if (column.expr.tag === ExprTag.Unknown) {
5968
5933
  throw new InvalidQueryError(wrongExprTag + column.expr.tag);
5969
5934
  }
5970
5935
  }
@@ -6988,7 +6953,9 @@ var Query = /** @class */ (function () {
6988
6953
  var expr = cond.expressions[part.index];
6989
6954
  if (expr.kind == DataKind.Attribute || expr.tag == ExprTag.EntityAttribute) {
6990
6955
  var attr = model.getAttributeById(expr.value);
6991
- txt = model.getAttributeText(attr, "{entity} {attr}");
6956
+ if (attr != null) {
6957
+ txt = model.getAttributeText(attr, "{entity} {attr}");
6958
+ }
6992
6959
  }
6993
6960
  else {
6994
6961
  txt = expr.getText();