@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.
- package/dist/browser/easydata.js +32 -24
- package/dist/browser/easydata.js.map +1 -1
- package/dist/browser/easydata.min.js +1 -1
- package/dist/browser/easydata.min.js.map +1 -1
- package/dist/bundles/easydata.crud.js +32 -24
- package/dist/bundles/easydata.crud.js.map +1 -1
- package/dist/bundles/easydata.crud.min.js +1 -1
- package/dist/bundles/easydata.crud.min.js.map +1 -1
- package/dist/lib/widgets/text_filter_widget.js +24 -18
- package/dist/lib/widgets/text_filter_widget.js.map +1 -1
- package/package.json +3 -3
|
@@ -731,7 +731,7 @@ var i18n_i18n;
|
|
|
731
731
|
}
|
|
732
732
|
else if (['D', 'F', 'C'].indexOf(type) >= 0) {
|
|
733
733
|
var locale = getCurrentLocale();
|
|
734
|
-
return number.toLocaleString(locale,
|
|
734
|
+
return number.toLocaleString(locale, getNumberFormatOptions(format));
|
|
735
735
|
}
|
|
736
736
|
else {
|
|
737
737
|
return convertWithMask(Math.trunc(number), format);
|
|
@@ -807,7 +807,7 @@ var i18n_i18n;
|
|
|
807
807
|
}
|
|
808
808
|
return result.split('').reverse().join('');
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function getNumberFormatOptions(format) {
|
|
811
811
|
var localeSettings = getLocaleSettings();
|
|
812
812
|
var type = format[0].toUpperCase();
|
|
813
813
|
var digits = (format.length > 1)
|
|
@@ -829,7 +829,8 @@ var i18n_i18n;
|
|
|
829
829
|
default:
|
|
830
830
|
return {
|
|
831
831
|
style: 'decimal',
|
|
832
|
-
minimumFractionDigits: digits
|
|
832
|
+
minimumFractionDigits: digits,
|
|
833
|
+
maximumFractionDigits: digits
|
|
833
834
|
};
|
|
834
835
|
}
|
|
835
836
|
}
|
|
@@ -4181,7 +4182,7 @@ var CellRendererType;
|
|
|
4181
4182
|
})(CellRendererType || (CellRendererType = {}));
|
|
4182
4183
|
var StringCellRendererDefault = function (value, column, cellValueElement, rowElement) {
|
|
4183
4184
|
var text = value ? value.toString().replace(/\n/g, '\u21B5 ') : '';
|
|
4184
|
-
cellValueElement.
|
|
4185
|
+
cellValueElement.innerText = text;
|
|
4185
4186
|
cellValueElement.title = text;
|
|
4186
4187
|
if (column.align == GridColumnAlign.NONE) {
|
|
4187
4188
|
cellValueElement.classList.add(cssPrefix + "-cell-value-align-left");
|
|
@@ -4200,7 +4201,7 @@ var NumberCellRendererDefault = function (value, column, cellValueElement, rowEl
|
|
|
4200
4201
|
strValue = value.toLocaleString();
|
|
4201
4202
|
}
|
|
4202
4203
|
}
|
|
4203
|
-
cellValueElement.
|
|
4204
|
+
cellValueElement.innerText = strValue;
|
|
4204
4205
|
cellValueElement.title = strValue;
|
|
4205
4206
|
if (column.align == GridColumnAlign.NONE) {
|
|
4206
4207
|
cellValueElement.classList.add(cssPrefix + "-cell-value-align-right");
|
|
@@ -4232,7 +4233,7 @@ var DateTimeCellRendererDefault = function (value, column, cellValueElement, row
|
|
|
4232
4233
|
}
|
|
4233
4234
|
}
|
|
4234
4235
|
}
|
|
4235
|
-
cellValueElement.
|
|
4236
|
+
cellValueElement.innerText = strValue;
|
|
4236
4237
|
cellValueElement.title = strValue;
|
|
4237
4238
|
if (column.align == GridColumnAlign.NONE) {
|
|
4238
4239
|
cellValueElement.classList.add(cssPrefix + "-cell-value-align-right");
|
|
@@ -4610,6 +4611,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4610
4611
|
widthOptions[dataType] = easy_grid_assign(easy_grid_assign({}, widthOptions.otherColumns), widthOptions[dataType]);
|
|
4611
4612
|
}
|
|
4612
4613
|
});
|
|
4614
|
+
widthOptions[DataType.Unknown] = widthOptions.otherColumns;
|
|
4613
4615
|
};
|
|
4614
4616
|
EasyGrid.prototype.setSlot = function (slot) {
|
|
4615
4617
|
if (typeof slot === 'string') {
|
|
@@ -7169,7 +7171,12 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
7169
7171
|
else {
|
|
7170
7172
|
value = value.toLocaleString();
|
|
7171
7173
|
}
|
|
7172
|
-
|
|
7174
|
+
var result = this.highlightText(value.toString());
|
|
7175
|
+
if (result instanceof HTMLElement) {
|
|
7176
|
+
cellElement.title = value;
|
|
7177
|
+
cellElement.appendChild(result);
|
|
7178
|
+
return;
|
|
7179
|
+
}
|
|
7173
7180
|
}
|
|
7174
7181
|
}
|
|
7175
7182
|
defaultRenderer(value, column, cellElement, rowElement);
|
|
@@ -7178,8 +7185,6 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
7178
7185
|
var normalizedContent = content.toLowerCase();
|
|
7179
7186
|
var filterValue = this.filter.getValue().toString();
|
|
7180
7187
|
if (filterValue && filterValue.length > 0 && content && content.length > 0) {
|
|
7181
|
-
var insertValue1 = "<span style='background-color: yellow'>";
|
|
7182
|
-
var insertValue2 = "</span>";
|
|
7183
7188
|
var indexInMas = [];
|
|
7184
7189
|
var words = filterValue.split('||').map(function (w) { return w.trim().toLowerCase(); });
|
|
7185
7190
|
for (var i = 0; i < words.length; i++) {
|
|
@@ -7188,7 +7193,10 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
7188
7193
|
if (!lowerWord.length)
|
|
7189
7194
|
continue;
|
|
7190
7195
|
if (lowerWord === normalizedContent) {
|
|
7191
|
-
|
|
7196
|
+
var highlightSpan = document.createElement('span');
|
|
7197
|
+
highlightSpan.style.backgroundColor = 'yellow';
|
|
7198
|
+
highlightSpan.innerText = content;
|
|
7199
|
+
return highlightSpan;
|
|
7192
7200
|
}
|
|
7193
7201
|
while (pos < content.length - 1) {
|
|
7194
7202
|
var index = normalizedContent.indexOf(lowerWord, pos);
|
|
@@ -7228,24 +7236,24 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
7228
7236
|
i++;
|
|
7229
7237
|
}
|
|
7230
7238
|
}
|
|
7231
|
-
var
|
|
7239
|
+
var div = document.createElement('div');
|
|
7232
7240
|
for (var i = 0; i < indexInMas.length; i++) {
|
|
7233
7241
|
if (i === 0) {
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
result += insertValue1
|
|
7237
|
-
+ content.substring(indexInMas[i].index, indexInMas[i].index + indexInMas[i].length)
|
|
7238
|
-
+ insertValue2;
|
|
7239
|
-
if (i < indexInMas.length - 1) {
|
|
7240
|
-
result += content.substring(indexInMas[i].index
|
|
7241
|
-
+ indexInMas[i].length, indexInMas[i + 1].index);
|
|
7242
|
-
}
|
|
7243
|
-
else {
|
|
7244
|
-
result += content.substring(indexInMas[i].index
|
|
7245
|
-
+ indexInMas[i].length);
|
|
7242
|
+
var text_1 = document.createTextNode(content.substring(0, indexInMas[i].index));
|
|
7243
|
+
div.appendChild(text_1);
|
|
7246
7244
|
}
|
|
7245
|
+
var highlightSpan = document.createElement('span');
|
|
7246
|
+
highlightSpan.style.backgroundColor = 'yellow';
|
|
7247
|
+
highlightSpan.innerText = content.substring(indexInMas[i].index, indexInMas[i].index + indexInMas[i].length);
|
|
7248
|
+
div.appendChild(highlightSpan);
|
|
7249
|
+
var text = (i < indexInMas.length - 1)
|
|
7250
|
+
? document.createTextNode(content.substring(indexInMas[i].index
|
|
7251
|
+
+ indexInMas[i].length, indexInMas[i + 1].index))
|
|
7252
|
+
: document.createTextNode(content.substring(indexInMas[i].index
|
|
7253
|
+
+ indexInMas[i].length));
|
|
7254
|
+
div.appendChild(text);
|
|
7247
7255
|
}
|
|
7248
|
-
|
|
7256
|
+
return div;
|
|
7249
7257
|
}
|
|
7250
7258
|
}
|
|
7251
7259
|
return content;
|