@easydata/crud 1.4.5-rc02 → 1.4.6

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.
@@ -3335,7 +3335,7 @@ var i18n;
3335
3335
  }
3336
3336
  else if (['D', 'F', 'C'].indexOf(type) >= 0) {
3337
3337
  var locale = getCurrentLocale();
3338
- return number.toLocaleString(locale, getNumberFromatOptions(format));
3338
+ return number.toLocaleString(locale, getNumberFormatOptions(format));
3339
3339
  }
3340
3340
  else {
3341
3341
  return convertWithMask(Math.trunc(number), format);
@@ -3411,7 +3411,7 @@ var i18n;
3411
3411
  }
3412
3412
  return result.split('').reverse().join('');
3413
3413
  }
3414
- function getNumberFromatOptions(format) {
3414
+ function getNumberFormatOptions(format) {
3415
3415
  var localeSettings = getLocaleSettings();
3416
3416
  var type = format[0].toUpperCase();
3417
3417
  var digits = (format.length > 1)
@@ -3433,7 +3433,8 @@ var i18n;
3433
3433
  default:
3434
3434
  return {
3435
3435
  style: 'decimal',
3436
- minimumFractionDigits: digits
3436
+ minimumFractionDigits: digits,
3437
+ maximumFractionDigits: digits
3437
3438
  };
3438
3439
  }
3439
3440
  }
@@ -4340,7 +4341,7 @@ var CellRendererType;
4340
4341
  })(CellRendererType || (CellRendererType = {}));
4341
4342
  var StringCellRendererDefault = function (value, column, cellValueElement, rowElement) {
4342
4343
  var text = value ? value.toString().replace(/\n/g, '\u21B5 ') : '';
4343
- cellValueElement.innerHTML = text;
4344
+ cellValueElement.innerText = text;
4344
4345
  cellValueElement.title = text;
4345
4346
  if (column.align == _easy_grid_columns__WEBPACK_IMPORTED_MODULE_1__[/* GridColumnAlign */ "b"].NONE) {
4346
4347
  cellValueElement.classList.add(cssPrefix + "-cell-value-align-left");
@@ -4359,7 +4360,7 @@ var NumberCellRendererDefault = function (value, column, cellValueElement, rowEl
4359
4360
  strValue = value.toLocaleString();
4360
4361
  }
4361
4362
  }
4362
- cellValueElement.innerHTML = strValue;
4363
+ cellValueElement.innerText = strValue;
4363
4364
  cellValueElement.title = strValue;
4364
4365
  if (column.align == _easy_grid_columns__WEBPACK_IMPORTED_MODULE_1__[/* GridColumnAlign */ "b"].NONE) {
4365
4366
  cellValueElement.classList.add(cssPrefix + "-cell-value-align-right");
@@ -4391,7 +4392,7 @@ var DateTimeCellRendererDefault = function (value, column, cellValueElement, row
4391
4392
  }
4392
4393
  }
4393
4394
  }
4394
- cellValueElement.innerHTML = strValue;
4395
+ cellValueElement.innerText = strValue;
4395
4396
  cellValueElement.title = strValue;
4396
4397
  if (column.align == _easy_grid_columns__WEBPACK_IMPORTED_MODULE_1__[/* GridColumnAlign */ "b"].NONE) {
4397
4398
  cellValueElement.classList.add(cssPrefix + "-cell-value-align-right");
@@ -7708,6 +7709,7 @@ var EasyGrid = /** @class */ (function () {
7708
7709
  widthOptions[dataType] = __assign(__assign({}, widthOptions.otherColumns), widthOptions[dataType]);
7709
7710
  }
7710
7711
  });
7712
+ widthOptions[_easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Unknown] = widthOptions.otherColumns;
7711
7713
  };
7712
7714
  EasyGrid.prototype.setSlot = function (slot) {
7713
7715
  if (typeof slot === 'string') {
@@ -11597,7 +11599,12 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
11597
11599
  else {
11598
11600
  value = value.toLocaleString();
11599
11601
  }
11600
- value = this.highlightText(value.toString());
11602
+ var result = this.highlightText(value.toString());
11603
+ if (result instanceof HTMLElement) {
11604
+ cellElement.title = value;
11605
+ cellElement.appendChild(result);
11606
+ return;
11607
+ }
11601
11608
  }
11602
11609
  }
11603
11610
  defaultRenderer(value, column, cellElement, rowElement);
@@ -11606,8 +11613,6 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
11606
11613
  var normalizedContent = content.toLowerCase();
11607
11614
  var filterValue = this.filter.getValue().toString();
11608
11615
  if (filterValue && filterValue.length > 0 && content && content.length > 0) {
11609
- var insertValue1 = "<span style='background-color: yellow'>";
11610
- var insertValue2 = "</span>";
11611
11616
  var indexInMas = [];
11612
11617
  var words = filterValue.split('||').map(function (w) { return w.trim().toLowerCase(); });
11613
11618
  for (var i = 0; i < words.length; i++) {
@@ -11616,7 +11621,10 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
11616
11621
  if (!lowerWord.length)
11617
11622
  continue;
11618
11623
  if (lowerWord === normalizedContent) {
11619
- return insertValue1 + content + insertValue2;
11624
+ var highlightSpan = document.createElement('span');
11625
+ highlightSpan.style.backgroundColor = 'yellow';
11626
+ highlightSpan.innerText = content;
11627
+ return highlightSpan;
11620
11628
  }
11621
11629
  while (pos < content.length - 1) {
11622
11630
  var index = normalizedContent.indexOf(lowerWord, pos);
@@ -11656,24 +11664,24 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
11656
11664
  i++;
11657
11665
  }
11658
11666
  }
11659
- var result = '';
11667
+ var div = document.createElement('div');
11660
11668
  for (var i = 0; i < indexInMas.length; i++) {
11661
11669
  if (i === 0) {
11662
- result += content.substring(0, indexInMas[i].index);
11663
- }
11664
- result += insertValue1
11665
- + content.substring(indexInMas[i].index, indexInMas[i].index + indexInMas[i].length)
11666
- + insertValue2;
11667
- if (i < indexInMas.length - 1) {
11668
- result += content.substring(indexInMas[i].index
11669
- + indexInMas[i].length, indexInMas[i + 1].index);
11670
- }
11671
- else {
11672
- result += content.substring(indexInMas[i].index
11673
- + indexInMas[i].length);
11670
+ var text_1 = document.createTextNode(content.substring(0, indexInMas[i].index));
11671
+ div.appendChild(text_1);
11674
11672
  }
11673
+ var highlightSpan = document.createElement('span');
11674
+ highlightSpan.style.backgroundColor = 'yellow';
11675
+ highlightSpan.innerText = content.substring(indexInMas[i].index, indexInMas[i].index + indexInMas[i].length);
11676
+ div.appendChild(highlightSpan);
11677
+ var text = (i < indexInMas.length - 1)
11678
+ ? document.createTextNode(content.substring(indexInMas[i].index
11679
+ + indexInMas[i].length, indexInMas[i + 1].index))
11680
+ : document.createTextNode(content.substring(indexInMas[i].index
11681
+ + indexInMas[i].length));
11682
+ div.appendChild(text);
11675
11683
  }
11676
- content = result;
11684
+ return div;
11677
11685
  }
11678
11686
  }
11679
11687
  return content;