@esfaenza/es-table 11.2.84 → 11.2.85
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/bundles/esfaenza-es-table.umd.js +22 -16
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +23 -17
- package/fesm2015/esfaenza-es-table.js +22 -16
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/package.json +1 -1
|
@@ -5032,7 +5032,23 @@
|
|
|
5032
5032
|
*/
|
|
5033
5033
|
EsTableComponent.prototype.dbClickEditOrSingleClickRowSelection = function ($event, rowItem, item, rowIndex) {
|
|
5034
5034
|
var _this = this;
|
|
5035
|
-
var _a;
|
|
5035
|
+
var _a, _b;
|
|
5036
|
+
// Modalità Editable, gestisco i doppi click senza però rallentare la modalità di selezione a range
|
|
5037
|
+
if (this.Editable) {
|
|
5038
|
+
// Secondo click: se il timer non è scaduto è un doppio click ed eseguo il resto
|
|
5039
|
+
if (this.cellDbClickTimer) {
|
|
5040
|
+
if (rowItem.PropertyName)
|
|
5041
|
+
this.setupUserEdit(rowItem, item);
|
|
5042
|
+
this.clearCellClickTimer();
|
|
5043
|
+
return;
|
|
5044
|
+
}
|
|
5045
|
+
// Primo click: non fa niente e se il tempo per il secondo click scade resetta tutto
|
|
5046
|
+
this.cellDbClickTimer = setTimeout(function () {
|
|
5047
|
+
_this.clearCellClickTimer();
|
|
5048
|
+
if (!_this.RangeSelection)
|
|
5049
|
+
_this.handleRowClick($event, item, _this.Selection, true);
|
|
5050
|
+
}, this.doubleClickBufferMs);
|
|
5051
|
+
}
|
|
5036
5052
|
// In modalità a range la creazione del range è gestita dai mousedown, move ed up...
|
|
5037
5053
|
// La selezione delle righe invece è gestita dalle caselline a sinistra
|
|
5038
5054
|
if (this.RangeSelection)
|
|
@@ -5041,7 +5057,7 @@
|
|
|
5041
5057
|
if ($event.ctrlKey)
|
|
5042
5058
|
return;
|
|
5043
5059
|
// Tutti i click su una cella già in edit non devono effettuare la selezione della riga
|
|
5044
|
-
if ((this.DynamicRowColumnsDefinition.length > 0 && rowItem.edits && ((
|
|
5060
|
+
if ((((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0 && rowItem.edits && ((_b = rowItem.edits[item._hash]) === null || _b === void 0 ? void 0 : _b._editing)) ||
|
|
5045
5061
|
rowItem._editing)
|
|
5046
5062
|
return;
|
|
5047
5063
|
// Per evitare di rallentare a prescindere
|
|
@@ -5049,18 +5065,6 @@
|
|
|
5049
5065
|
this.handleRowClick($event, item, this.Selection, true);
|
|
5050
5066
|
return;
|
|
5051
5067
|
}
|
|
5052
|
-
// Secondo click: se il timer non è scaduto è un doppio click ed eseguo il resto
|
|
5053
|
-
if (this.cellDbClickTimer) {
|
|
5054
|
-
if (this.Editable && rowItem.PropertyName)
|
|
5055
|
-
this.setupUserEdit(rowItem, item);
|
|
5056
|
-
this.clearCellClickTimer();
|
|
5057
|
-
return;
|
|
5058
|
-
}
|
|
5059
|
-
// Primo click: non fa niente e se il tempo per il secondo click scade resetta tutto
|
|
5060
|
-
this.cellDbClickTimer = setTimeout(function () {
|
|
5061
|
-
_this.clearCellClickTimer();
|
|
5062
|
-
_this.handleRowClick($event, item, _this.Selection, true);
|
|
5063
|
-
}, this.doubleClickBufferMs);
|
|
5064
5068
|
};
|
|
5065
5069
|
/** Evento che gestisce il comando "Copia" buttando i valori selezionati nella clipboard in base al loro tipo */
|
|
5066
5070
|
EsTableComponent.prototype.handleCopy = function () {
|
|
@@ -5155,9 +5159,10 @@
|
|
|
5155
5159
|
*/
|
|
5156
5160
|
EsTableComponent.prototype.setupUserEdit = function (rowItem, item) {
|
|
5157
5161
|
var _this = this;
|
|
5162
|
+
var _a;
|
|
5158
5163
|
this.selection_H.clearSelectionStatus();
|
|
5159
5164
|
if (this.Editable && rowItem.PropertyName) {
|
|
5160
|
-
if (this.DynamicRowColumnsDefinition.length > 0) {
|
|
5165
|
+
if (((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
5161
5166
|
rowItem.edits[item._hash] = { _editing: true, old_value: item[rowItem.PropertyName] };
|
|
5162
5167
|
}
|
|
5163
5168
|
else {
|
|
@@ -5176,7 +5181,8 @@
|
|
|
5176
5181
|
* @param {number} columnIndex Indice della colonna su cui è avvenuta la modifica
|
|
5177
5182
|
*/
|
|
5178
5183
|
EsTableComponent.prototype.finalizeUserEdit = function (rowItem, item, columnIndex) {
|
|
5179
|
-
var
|
|
5184
|
+
var _a;
|
|
5185
|
+
var dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
5180
5186
|
var rowItm = dynMode ? (rowItem.edits[item._hash]) : rowItem;
|
|
5181
5187
|
rowItm._editing = false;
|
|
5182
5188
|
var old = rowItm.old_value;
|