@tetacom/ng-components 1.0.62 → 1.0.65
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/component/input/text-field/text-field.component.d.ts +0 -1
- package/esm2020/component/input/text-field/text-field.component.mjs +13 -8
- 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 +51 -41
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +56 -46
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/pipe/number-pipe/number.pipe.d.ts +1 -1
|
@@ -3767,18 +3767,26 @@ class TextFieldComponent {
|
|
|
3767
3767
|
this.placeholder = '';
|
|
3768
3768
|
this.disabled = false;
|
|
3769
3769
|
this.onlyNumber = false;
|
|
3770
|
+
// @HostBinding('attr.tabindex')
|
|
3771
|
+
// private get tabindex() {
|
|
3772
|
+
// return this.disabled ? null : 0;
|
|
3773
|
+
// }
|
|
3770
3774
|
this.textField = true;
|
|
3771
3775
|
this.value = '';
|
|
3772
3776
|
}
|
|
3773
|
-
get tabindex() {
|
|
3774
|
-
return this.disabled ? null : 0;
|
|
3775
|
-
}
|
|
3776
3777
|
onFocus() {
|
|
3777
3778
|
if (this.disabled) {
|
|
3778
3779
|
return;
|
|
3779
3780
|
}
|
|
3780
3781
|
this.input.nativeElement.focus();
|
|
3781
3782
|
}
|
|
3783
|
+
//
|
|
3784
|
+
// @HostListener('focus') focus() {
|
|
3785
|
+
// if (this.disabled) {
|
|
3786
|
+
// return;
|
|
3787
|
+
// }
|
|
3788
|
+
// this.input.nativeElement.focus();
|
|
3789
|
+
// }
|
|
3782
3790
|
keyPress(event) {
|
|
3783
3791
|
if (event.key === 'Enter' || event.keyCode === 13) {
|
|
3784
3792
|
this.input.nativeElement.blur();
|
|
@@ -3807,7 +3815,7 @@ class TextFieldComponent {
|
|
|
3807
3815
|
}
|
|
3808
3816
|
}
|
|
3809
3817
|
TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TextFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3810
|
-
TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TextFieldComponent, selector: "teta-text-field", inputs: { placeholder: "placeholder", leftIconName: "leftIconName", disabled: "disabled", onlyNumber: "onlyNumber", invalid: "invalid" }, host: { listeners: { "click": "onFocus()" }, properties: { "class.text-field_disabled": "this.disabled", "class.text-field_invalid": "this.invalid", "
|
|
3818
|
+
TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TextFieldComponent, selector: "teta-text-field", inputs: { placeholder: "placeholder", leftIconName: "leftIconName", disabled: "disabled", onlyNumber: "onlyNumber", invalid: "invalid" }, host: { listeners: { "click": "onFocus()" }, properties: { "class.text-field_disabled": "this.disabled", "class.text-field_invalid": "this.invalid", "class.text-field": "this.textField" } }, providers: [
|
|
3811
3819
|
{
|
|
3812
3820
|
provide: NG_VALUE_ACCESSOR,
|
|
3813
3821
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
@@ -3842,9 +3850,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
3842
3850
|
}], input: [{
|
|
3843
3851
|
type: ViewChild,
|
|
3844
3852
|
args: ['input', { static: false }]
|
|
3845
|
-
}], tabindex: [{
|
|
3846
|
-
type: HostBinding,
|
|
3847
|
-
args: ['attr.tabindex']
|
|
3848
3853
|
}], textField: [{
|
|
3849
3854
|
type: HostBinding,
|
|
3850
3855
|
args: ['class.text-field']
|
|
@@ -6600,13 +6605,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
6600
6605
|
|
|
6601
6606
|
class NumberPipe {
|
|
6602
6607
|
transform(value, decimalLength = 2, chunkDelimiter = '', decimalDelimiter = '.', chunkLength = 3) {
|
|
6603
|
-
if (value === null || value === undefined) {
|
|
6608
|
+
if (value === null || value === undefined || value === '') {
|
|
6604
6609
|
return '';
|
|
6605
6610
|
}
|
|
6606
|
-
if (value
|
|
6611
|
+
if (typeof value === 'string' && isNaN(parseFloat(value))) {
|
|
6607
6612
|
return value.toString();
|
|
6608
6613
|
}
|
|
6609
|
-
value
|
|
6614
|
+
value = Number(value);
|
|
6610
6615
|
return formatNumber(value, decimalLength, chunkDelimiter, decimalDelimiter, chunkLength);
|
|
6611
6616
|
}
|
|
6612
6617
|
}
|
|
@@ -9890,40 +9895,43 @@ class TableComponent {
|
|
|
9890
9895
|
}
|
|
9891
9896
|
handleClickOutsideAnyRow(event) {
|
|
9892
9897
|
const coordinates = this.getCoordinates(event);
|
|
9893
|
-
if (coordinates) {
|
|
9894
|
-
this.cellClick.emit({
|
|
9895
|
-
...this._svc.getCellInstance(coordinates),
|
|
9896
|
-
event
|
|
9897
|
-
});
|
|
9898
|
-
if (this.editEvent === EditEvent.click) {
|
|
9899
|
-
this.startEditRowOrCell(coordinates);
|
|
9900
|
-
}
|
|
9901
|
-
else {
|
|
9902
|
-
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9903
|
-
this.startEditRowOrCell(null);
|
|
9904
|
-
}
|
|
9905
|
-
}
|
|
9906
|
-
}
|
|
9907
9898
|
const row = this.getRow(event);
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9899
|
+
const eventIsOnRow = this.eventIsOnRow(event);
|
|
9900
|
+
setTimeout(() => {
|
|
9901
|
+
if (coordinates) {
|
|
9902
|
+
this.cellClick.emit({
|
|
9903
|
+
...this._svc.getCellInstance(coordinates),
|
|
9904
|
+
event
|
|
9905
|
+
});
|
|
9906
|
+
if (this.editEvent === EditEvent.click) {
|
|
9907
|
+
this.startEditRowOrCell(coordinates);
|
|
9908
|
+
}
|
|
9909
|
+
else {
|
|
9910
|
+
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9911
|
+
this.startEditRowOrCell(null);
|
|
9912
|
+
}
|
|
9913
|
+
}
|
|
9917
9914
|
}
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9915
|
+
if (row) {
|
|
9916
|
+
if (event.ctrlKey) {
|
|
9917
|
+
this._svc.selectOrDeselectRow(row);
|
|
9918
|
+
}
|
|
9919
|
+
else if (event.shiftKey) {
|
|
9920
|
+
this._svc.selectRange(row);
|
|
9921
|
+
}
|
|
9922
|
+
else {
|
|
9923
|
+
this._svc.selectRows([row]);
|
|
9924
|
+
}
|
|
9922
9925
|
}
|
|
9923
|
-
|
|
9924
|
-
this.
|
|
9926
|
+
if (!eventIsOnRow && !event.defaultPrevented) {
|
|
9927
|
+
if (this.editType === EditType.row) {
|
|
9928
|
+
this._svc.startEditRow(null);
|
|
9929
|
+
}
|
|
9930
|
+
else {
|
|
9931
|
+
this._svc.startEditCell(null);
|
|
9932
|
+
}
|
|
9925
9933
|
}
|
|
9926
|
-
}
|
|
9934
|
+
});
|
|
9927
9935
|
}
|
|
9928
9936
|
focusIn(event) {
|
|
9929
9937
|
const coordinates = this.getCoordinates(event);
|
|
@@ -9940,13 +9948,15 @@ class TableComponent {
|
|
|
9940
9948
|
dblclick(event) {
|
|
9941
9949
|
const coordinates = this.getCoordinates(event);
|
|
9942
9950
|
if (coordinates) {
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9951
|
+
setTimeout(() => {
|
|
9952
|
+
this.cellDoubleClick.emit({
|
|
9953
|
+
...this._svc.getCellInstance(coordinates),
|
|
9954
|
+
event
|
|
9955
|
+
});
|
|
9956
|
+
if (this.editEvent === EditEvent.doubleClick) {
|
|
9957
|
+
this.startEditRowOrCell(coordinates);
|
|
9958
|
+
}
|
|
9946
9959
|
});
|
|
9947
|
-
if (this.editEvent === EditEvent.doubleClick) {
|
|
9948
|
-
this.startEditRowOrCell(coordinates);
|
|
9949
|
-
}
|
|
9950
9960
|
}
|
|
9951
9961
|
}
|
|
9952
9962
|
keydown(event) {
|