@easydata/crud 1.4.3 → 1.4.5-rc02
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 +20 -11
- 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 +20 -11
- 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/views/entity_data_view.d.ts +1 -0
- package/dist/lib/views/entity_data_view.js +10 -4
- package/dist/lib/views/entity_data_view.js.map +1 -1
- package/dist/lib/widgets/text_filter_widget.d.ts +1 -1
- package/dist/lib/widgets/text_filter_widget.js +8 -6
- package/dist/lib/widgets/text_filter_widget.js.map +1 -1
- package/package.json +3 -3
package/dist/browser/easydata.js
CHANGED
|
@@ -286,7 +286,8 @@ var meta_entity_MetaEntityAttr = /** @class */ (function () {
|
|
|
286
286
|
this.lookupEntity = dto.lent;
|
|
287
287
|
this.dataAttr = dto.dattr;
|
|
288
288
|
this.lookupDataAttr = dto.ldattr;
|
|
289
|
-
|
|
289
|
+
var isDataType = utils["a" /* utils */].getDateDataTypes().indexOf(this.dataType);
|
|
290
|
+
this.defaultValue = dto.defVal && isDataType ? new Date(dto.defVal) : dto.defVal;
|
|
290
291
|
this.isNullable = utils["a" /* utils */].getIfDefined(dto.nul, this.isNullable);
|
|
291
292
|
this.isEditable = utils["a" /* utils */].getIfDefined(dto.ied, this.isEditable);
|
|
292
293
|
this.showOnView = utils["a" /* utils */].getIfDefined(dto.ivis || dto.sov, this.showOnView);
|
|
@@ -11548,7 +11549,7 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
11548
11549
|
};
|
|
11549
11550
|
TextFilterWidget.prototype.inputKeydownHandler = function (ev) {
|
|
11550
11551
|
if (ev.keyCode == 13) {
|
|
11551
|
-
this.applyFilter();
|
|
11552
|
+
this.applyFilter(true);
|
|
11552
11553
|
}
|
|
11553
11554
|
};
|
|
11554
11555
|
TextFilterWidget.prototype.inputKeyupHandler = function () {
|
|
@@ -11557,29 +11558,31 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
11557
11558
|
clearTimeout(this.applyFilterTimeout);
|
|
11558
11559
|
}
|
|
11559
11560
|
this.applyFilterTimeout = setTimeout(function () {
|
|
11560
|
-
_this.applyFilter();
|
|
11561
|
+
_this.applyFilter(true);
|
|
11561
11562
|
}, this.options.instantTimeout);
|
|
11562
11563
|
};
|
|
11563
11564
|
TextFilterWidget.prototype.clearButtonClickHander = function () {
|
|
11564
11565
|
this.filterInput.value = '';
|
|
11565
11566
|
this.filterInput.focus();
|
|
11566
|
-
this.applyFilter();
|
|
11567
|
+
this.applyFilter(true);
|
|
11567
11568
|
};
|
|
11568
11569
|
TextFilterWidget.prototype.searchButtonClickHandler = function () {
|
|
11569
|
-
this.applyFilter();
|
|
11570
|
+
this.applyFilter(true);
|
|
11570
11571
|
};
|
|
11571
|
-
TextFilterWidget.prototype.applyFilter = function () {
|
|
11572
|
+
TextFilterWidget.prototype.applyFilter = function (checkChange) {
|
|
11572
11573
|
var _this = this;
|
|
11573
11574
|
if (this.applyFilterTimeout) {
|
|
11574
11575
|
clearTimeout(this.applyFilterTimeout);
|
|
11575
11576
|
}
|
|
11576
11577
|
var filterValue = this.filter.getValue();
|
|
11577
|
-
if (filterValue != this.filterInput.value) {
|
|
11578
|
+
if (!checkChange || filterValue != this.filterInput.value) {
|
|
11578
11579
|
this.filter.apply(this.filterInput.value)
|
|
11579
11580
|
.then(function (data) {
|
|
11580
11581
|
_this.grid.setData(data);
|
|
11581
11582
|
});
|
|
11583
|
+
return true;
|
|
11582
11584
|
}
|
|
11585
|
+
return false;
|
|
11583
11586
|
};
|
|
11584
11587
|
TextFilterWidget.prototype.highlightCellRenderer = function (defaultRenderer, value, column, cellElement, rowElement) {
|
|
11585
11588
|
if (public_api["utils"].isNumericType(column.type)
|
|
@@ -12516,7 +12519,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12516
12519
|
}).toDOM();
|
|
12517
12520
|
_this.slot.insertBefore(filterBarDiv, gridSlot);
|
|
12518
12521
|
var dataFilter = _this.context.createFilter();
|
|
12519
|
-
new text_filter_widget_TextFilterWidget(filterWidgetSlot_1, _this.grid, dataFilter);
|
|
12522
|
+
_this.filterWidget = new text_filter_widget_TextFilterWidget(filterWidgetSlot_1, _this.grid, dataFilter);
|
|
12520
12523
|
}
|
|
12521
12524
|
});
|
|
12522
12525
|
};
|
|
@@ -12570,7 +12573,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12570
12573
|
};
|
|
12571
12574
|
EntityDataView.prototype.editClickHandler = function (ev, rowIndex) {
|
|
12572
12575
|
var _this = this;
|
|
12573
|
-
this.
|
|
12576
|
+
this.grid.getData().getRow(rowIndex)
|
|
12574
12577
|
.then(function (row) {
|
|
12575
12578
|
if (row) {
|
|
12576
12579
|
_this.showEditForm(row);
|
|
@@ -12609,7 +12612,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12609
12612
|
};
|
|
12610
12613
|
EntityDataView.prototype.deleteClickHandler = function (ev, rowIndex) {
|
|
12611
12614
|
var _this = this;
|
|
12612
|
-
this.
|
|
12615
|
+
this.grid.getData().getRow(rowIndex)
|
|
12613
12616
|
.then(function (row) {
|
|
12614
12617
|
if (row) {
|
|
12615
12618
|
var activeEntity = _this.context.getActiveEntity();
|
|
@@ -12650,7 +12653,13 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12650
12653
|
var _this = this;
|
|
12651
12654
|
return this.context.fetchDataset()
|
|
12652
12655
|
.then(function () {
|
|
12653
|
-
|
|
12656
|
+
var processed = false;
|
|
12657
|
+
if (_this.filterWidget) {
|
|
12658
|
+
processed = _this.filterWidget.applyFilter(false);
|
|
12659
|
+
}
|
|
12660
|
+
if (!processed) {
|
|
12661
|
+
_this.grid.refresh();
|
|
12662
|
+
}
|
|
12654
12663
|
});
|
|
12655
12664
|
};
|
|
12656
12665
|
return EntityDataView;
|