@tetacom/ng-components 1.0.61 → 1.0.64
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/esm2020/component/table/head-cell/head-cell.component.mjs +3 -9
- package/esm2020/component/table/table/table.component.mjs +42 -37
- package/esm2020/pipe/number-pipe/number.pipe.mjs +4 -4
- package/fesm2015/tetacom-ng-components.mjs +41 -42
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +46 -47
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/pipe/number-pipe/number.pipe.d.ts +1 -1
- package/style/button.scss +3 -0
|
@@ -6600,13 +6600,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
6600
6600
|
|
|
6601
6601
|
class NumberPipe {
|
|
6602
6602
|
transform(value, decimalLength = 2, chunkDelimiter = '', decimalDelimiter = '.', chunkLength = 3) {
|
|
6603
|
-
if (value === null || value === undefined) {
|
|
6603
|
+
if (value === null || value === undefined || value === '') {
|
|
6604
6604
|
return '';
|
|
6605
6605
|
}
|
|
6606
|
-
if (value
|
|
6606
|
+
if (typeof value === 'string' && isNaN(parseFloat(value))) {
|
|
6607
6607
|
return value.toString();
|
|
6608
6608
|
}
|
|
6609
|
-
value
|
|
6609
|
+
value = Number(value);
|
|
6610
6610
|
return formatNumber(value, decimalLength, chunkDelimiter, decimalDelimiter, chunkLength);
|
|
6611
6611
|
}
|
|
6612
6612
|
}
|
|
@@ -8953,13 +8953,6 @@ class HeadCellComponent {
|
|
|
8953
8953
|
ngOnDestroy() {
|
|
8954
8954
|
this._alive = false;
|
|
8955
8955
|
}
|
|
8956
|
-
// autosizeColumn() {
|
|
8957
|
-
// this._svc.autosizeColumn(this.column, this._elementRef.nativeElement);
|
|
8958
|
-
// }
|
|
8959
|
-
//
|
|
8960
|
-
// autosizeAllColumns() {
|
|
8961
|
-
// this._svc.autosizeAllColumns(this._elementRef.nativeElement);
|
|
8962
|
-
// }
|
|
8963
8956
|
resizeStart(event) {
|
|
8964
8957
|
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
8965
8958
|
this._startPosition = rect.x;
|
|
@@ -8967,8 +8960,9 @@ class HeadCellComponent {
|
|
|
8967
8960
|
}
|
|
8968
8961
|
resizeProcess(event) {
|
|
8969
8962
|
if (this._startPosition && event.pageX > 0) {
|
|
8963
|
+
const position = this._startPosition;
|
|
8970
8964
|
requestAnimationFrame(() => {
|
|
8971
|
-
this._svc.resizeColumn(new ColumnResizeEvent(this.column, event.pageX -
|
|
8965
|
+
this._svc.resizeColumn(new ColumnResizeEvent(this.column, event.pageX - position));
|
|
8972
8966
|
this._app.tick();
|
|
8973
8967
|
});
|
|
8974
8968
|
}
|
|
@@ -9896,40 +9890,43 @@ class TableComponent {
|
|
|
9896
9890
|
}
|
|
9897
9891
|
handleClickOutsideAnyRow(event) {
|
|
9898
9892
|
const coordinates = this.getCoordinates(event);
|
|
9899
|
-
if (coordinates) {
|
|
9900
|
-
this.cellClick.emit({
|
|
9901
|
-
...this._svc.getCellInstance(coordinates),
|
|
9902
|
-
event
|
|
9903
|
-
});
|
|
9904
|
-
if (this.editEvent === EditEvent.click) {
|
|
9905
|
-
this.startEditRowOrCell(coordinates);
|
|
9906
|
-
}
|
|
9907
|
-
else {
|
|
9908
|
-
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9909
|
-
this.startEditRowOrCell(null);
|
|
9910
|
-
}
|
|
9911
|
-
}
|
|
9912
|
-
}
|
|
9913
9893
|
const row = this.getRow(event);
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9894
|
+
const eventIsOnRow = this.eventIsOnRow(event);
|
|
9895
|
+
setTimeout(() => {
|
|
9896
|
+
if (coordinates) {
|
|
9897
|
+
this.cellClick.emit({
|
|
9898
|
+
...this._svc.getCellInstance(coordinates),
|
|
9899
|
+
event
|
|
9900
|
+
});
|
|
9901
|
+
if (this.editEvent === EditEvent.click) {
|
|
9902
|
+
this.startEditRowOrCell(coordinates);
|
|
9903
|
+
}
|
|
9904
|
+
else {
|
|
9905
|
+
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9906
|
+
this.startEditRowOrCell(null);
|
|
9907
|
+
}
|
|
9908
|
+
}
|
|
9923
9909
|
}
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9910
|
+
if (row) {
|
|
9911
|
+
if (event.ctrlKey) {
|
|
9912
|
+
this._svc.selectOrDeselectRow(row);
|
|
9913
|
+
}
|
|
9914
|
+
else if (event.shiftKey) {
|
|
9915
|
+
this._svc.selectRange(row);
|
|
9916
|
+
}
|
|
9917
|
+
else {
|
|
9918
|
+
this._svc.selectRows([row]);
|
|
9919
|
+
}
|
|
9928
9920
|
}
|
|
9929
|
-
|
|
9930
|
-
this.
|
|
9921
|
+
if (!eventIsOnRow && !event.defaultPrevented) {
|
|
9922
|
+
if (this.editType === EditType.row) {
|
|
9923
|
+
this._svc.startEditRow(null);
|
|
9924
|
+
}
|
|
9925
|
+
else {
|
|
9926
|
+
this._svc.startEditCell(null);
|
|
9927
|
+
}
|
|
9931
9928
|
}
|
|
9932
|
-
}
|
|
9929
|
+
});
|
|
9933
9930
|
}
|
|
9934
9931
|
focusIn(event) {
|
|
9935
9932
|
const coordinates = this.getCoordinates(event);
|
|
@@ -9946,13 +9943,15 @@ class TableComponent {
|
|
|
9946
9943
|
dblclick(event) {
|
|
9947
9944
|
const coordinates = this.getCoordinates(event);
|
|
9948
9945
|
if (coordinates) {
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9946
|
+
setTimeout(() => {
|
|
9947
|
+
this.cellDoubleClick.emit({
|
|
9948
|
+
...this._svc.getCellInstance(coordinates),
|
|
9949
|
+
event
|
|
9950
|
+
});
|
|
9951
|
+
if (this.editEvent === EditEvent.doubleClick) {
|
|
9952
|
+
this.startEditRowOrCell(coordinates);
|
|
9953
|
+
}
|
|
9952
9954
|
});
|
|
9953
|
-
if (this.editEvent === EditEvent.doubleClick) {
|
|
9954
|
-
this.startEditRowOrCell(coordinates);
|
|
9955
|
-
}
|
|
9956
9955
|
}
|
|
9957
9956
|
}
|
|
9958
9957
|
keydown(event) {
|