@tetacom/ng-components 1.0.6 → 1.0.10

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.
@@ -1163,12 +1163,12 @@ class DropdownBase {
1163
1163
  }
1164
1164
  }
1165
1165
  closeDropdown() {
1166
- if (this._body && this.container.contains(this._body)) {
1166
+ if (this.open && this._body && this.container.contains(this._body)) {
1167
1167
  this._renderer.removeChild(this.container, this._body);
1168
+ this._open = false;
1169
+ this._body = null;
1170
+ this.openChange.emit(this.open);
1168
1171
  }
1169
- this._open = false;
1170
- this._body = null;
1171
- this.openChange.emit(this.open);
1172
1172
  }
1173
1173
  openDropdown() {
1174
1174
  if (this._open || !this._content || this.disabled) {
@@ -2640,7 +2640,7 @@ class OnlyNumberDirective {
2640
2640
  if (this.tetaOnlyNumber === false) {
2641
2641
  return;
2642
2642
  }
2643
- value = value.replace(',', '.');
2643
+ value = value.replace(',', '.').trim();
2644
2644
  let regex = this._integerUnsigned;
2645
2645
  if (!this.allowDecimals && !this.allowSign) {
2646
2646
  regex = this._integerUnsigned;
@@ -2692,7 +2692,7 @@ class OnlyNumberDirective {
2692
2692
  if (value === '-0.0') {
2693
2693
  value = '0.0';
2694
2694
  }
2695
- const valid = new RegExp(regex).test(value);
2695
+ const valid = new RegExp(regex).test(value.toString());
2696
2696
  this._control.control.setValue(valid ? value : (_a = this._previousValue) !== null && _a !== void 0 ? _a : 0);
2697
2697
  }
2698
2698
  }
@@ -3554,6 +3554,7 @@ class TextFieldComponent {
3554
3554
  this.placeholder = '';
3555
3555
  this.disabled = false;
3556
3556
  this.onlyNumber = false;
3557
+ this.tabindex = 0;
3557
3558
  this.textField = true;
3558
3559
  this.value = '';
3559
3560
  }
@@ -3565,6 +3566,9 @@ class TextFieldComponent {
3565
3566
  this.input.nativeElement.blur();
3566
3567
  }
3567
3568
  }
3569
+ emitBlur() {
3570
+ this.onTouched();
3571
+ }
3568
3572
  registerOnChange(fn) {
3569
3573
  this.onChange = fn;
3570
3574
  }
@@ -3579,17 +3583,19 @@ class TextFieldComponent {
3579
3583
  this.value = input;
3580
3584
  this._cdr.detectChanges();
3581
3585
  }
3582
- onChange(input) { }
3583
- onTouched(input) { }
3586
+ onChange(input) {
3587
+ }
3588
+ onTouched() {
3589
+ }
3584
3590
  }
3585
3591
  TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3586
- TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", 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: [
3592
+ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", 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", "attr.tabindex": "this.tabindex", "class.text-field": "this.textField" } }, providers: [
3587
3593
  {
3588
3594
  provide: NG_VALUE_ACCESSOR,
3589
3595
  useExisting: forwardRef(() => TextFieldComponent),
3590
3596
  multi: true,
3591
3597
  },
3592
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3598
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3593
3599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, decorators: [{
3594
3600
  type: Component,
3595
3601
  args: [{ selector: 'teta-text-field', providers: [
@@ -3598,7 +3604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
3598
3604
  useExisting: forwardRef(() => TextFieldComponent),
3599
3605
  multi: true,
3600
3606
  },
3601
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""] }]
3607
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""] }]
3602
3608
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { placeholder: [{
3603
3609
  type: Input
3604
3610
  }], leftIconName: [{
@@ -3618,6 +3624,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
3618
3624
  }], input: [{
3619
3625
  type: ViewChild,
3620
3626
  args: ['input', { static: false }]
3627
+ }], tabindex: [{
3628
+ type: HostBinding,
3629
+ args: ['attr.tabindex']
3621
3630
  }], textField: [{
3622
3631
  type: HostBinding,
3623
3632
  args: ['class.text-field']
@@ -4151,9 +4160,8 @@ const getFilterComponent = (item) => filterComponentsMap.has(item.filterType)
4151
4160
  : StringFilterComponent;
4152
4161
 
4153
4162
  class FilterHostComponent {
4154
- constructor(viewContainerRef, componentFactoryResolver) {
4163
+ constructor(viewContainerRef) {
4155
4164
  this.viewContainerRef = viewContainerRef;
4156
- this.componentFactoryResolver = componentFactoryResolver;
4157
4165
  this.filterChanged = new EventEmitter();
4158
4166
  this._alive = true;
4159
4167
  }
@@ -4182,9 +4190,8 @@ class FilterHostComponent {
4182
4190
  if (!FilterComponentBase.isPrototypeOf(this._column.filterComponent)) {
4183
4191
  this._column.filterComponent = getFilterComponent(this._column);
4184
4192
  }
4185
- const compFactory = this.componentFactoryResolver.resolveComponentFactory(this._column.filterComponent);
4186
4193
  this._componentRef =
4187
- this.viewContainerRef.createComponent(compFactory);
4194
+ this.viewContainerRef.createComponent(this._column.filterComponent);
4188
4195
  this._componentRef.instance.column = this._column;
4189
4196
  this._componentRef.instance.state = this._state;
4190
4197
  this._componentRef.instance.filterOptions = this._filterOptions;
@@ -4200,7 +4207,7 @@ class FilterHostComponent {
4200
4207
  this._alive = false;
4201
4208
  }
4202
4209
  }
4203
- FilterHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
4210
+ FilterHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
4204
4211
  FilterHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: FilterHostComponent, selector: "teta-filter-host", inputs: { column: "column", state: "state", filterOptions: "filterOptions" }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4205
4212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, decorators: [{
4206
4213
  type: Component,
@@ -4210,7 +4217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
4210
4217
  styles: [],
4211
4218
  changeDetection: ChangeDetectionStrategy.OnPush,
4212
4219
  }]
4213
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { column: [{
4220
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
4214
4221
  type: Input
4215
4222
  }], state: [{
4216
4223
  type: Input
@@ -7662,9 +7669,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
7662
7669
  }] } });
7663
7670
 
7664
7671
  class HeadCellHostComponent {
7665
- constructor(viewContainerRef, componentFactoryResolver) {
7672
+ constructor(viewContainerRef) {
7666
7673
  this.viewContainerRef = viewContainerRef;
7667
- this.componentFactoryResolver = componentFactoryResolver;
7668
7674
  }
7669
7675
  set column(column) {
7670
7676
  this._column = column;
@@ -7679,19 +7685,18 @@ class HeadCellHostComponent {
7679
7685
  if (!HeadCellComponentBase.isPrototypeOf(this.column.headCellComponent)) {
7680
7686
  this.column.headCellComponent = DefaultHeadCellComponent;
7681
7687
  }
7682
- const compFactory = this.componentFactoryResolver.resolveComponentFactory(this.column.headCellComponent);
7683
7688
  this.componentRef =
7684
- this.viewContainerRef.createComponent(compFactory);
7689
+ this.viewContainerRef.createComponent(this.column.headCellComponent);
7685
7690
  this.componentRef.instance.column = this.column;
7686
7691
  this.init = true;
7687
7692
  }
7688
7693
  }
7689
- HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
7694
+ HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
7690
7695
  HeadCellHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: { column: "column" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7691
7696
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, decorators: [{
7692
7697
  type: Component,
7693
7698
  args: [{ selector: 'teta-head-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
7694
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { column: [{
7699
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
7695
7700
  type: Input
7696
7701
  }] } });
7697
7702
 
@@ -8740,7 +8745,7 @@ class DateCellComponent extends CellComponentBase {
8740
8745
  super.ngOnInit();
8741
8746
  }
8742
8747
  setValue(value) {
8743
- this.row.data[this.column.name] = value;
8748
+ this.row.data[this.column.name] = value ? new Date(value) : value;
8744
8749
  this.valueChanged();
8745
8750
  }
8746
8751
  startEdit(initiator, type) {
@@ -8757,10 +8762,10 @@ class DateCellComponent extends CellComponentBase {
8757
8762
  }
8758
8763
  }
8759
8764
  DateCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8760
- DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateCellComponent, selector: "teta-date-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\">\n {{row.data[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\" #input\n *ngIf=\"edit\"\n [appendToBody]=\"false\"\n [showTime]=\"false\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""], components: [{ type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "appendToBody", "showTime", "format"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "date": i2.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8765
+ DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateCellComponent, selector: "teta-date-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\">\n {{row.data[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\"\n #input\n *ngIf=\"edit\"\n [appendToBody]=\"false\"\n [showTime]=\"false\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""], components: [{ type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "appendToBody", "showTime", "format"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "date": i2.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8761
8766
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, decorators: [{
8762
8767
  type: Component,
8763
- args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\">\n {{row.data[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\" #input\n *ngIf=\"edit\"\n [appendToBody]=\"false\"\n [showTime]=\"false\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""] }]
8768
+ args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\">\n {{row.data[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\"\n #input\n *ngIf=\"edit\"\n [appendToBody]=\"false\"\n [showTime]=\"false\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""] }]
8764
8769
  }], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
8765
8770
  type: Input
8766
8771
  }], row: [{
@@ -8918,17 +8923,15 @@ const getCellComponent = (column) => cellComponentsMap.has(column.filterType)
8918
8923
  : StringCellComponent;
8919
8924
 
8920
8925
  class CellHostComponent {
8921
- constructor(viewContainerRef, componentFactoryResolver) {
8926
+ constructor(viewContainerRef) {
8922
8927
  this.viewContainerRef = viewContainerRef;
8923
- this.componentFactoryResolver = componentFactoryResolver;
8924
8928
  this._init = false;
8925
8929
  }
8926
8930
  ngOnInit() {
8927
8931
  if (!CellComponentBase.isPrototypeOf(this.column.cellComponent)) {
8928
8932
  this.column.cellComponent = getCellComponent(this.column);
8929
8933
  }
8930
- const compFactory = this.componentFactoryResolver.resolveComponentFactory(this.column.cellComponent);
8931
- this._componentRef = this.viewContainerRef.createComponent(compFactory);
8934
+ this._componentRef = this.viewContainerRef.createComponent(this.column.cellComponent);
8932
8935
  this._componentRef.instance.column = this.column;
8933
8936
  this._componentRef.instance.row = this.row;
8934
8937
  this._componentRef.instance.filterOptions = this.filterOptions;
@@ -8950,12 +8953,12 @@ class CellHostComponent {
8950
8953
  }
8951
8954
  }
8952
8955
  }
8953
- CellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CellHostComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
8956
+ CellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
8954
8957
  CellHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: CellHostComponent, selector: "teta-cell-host", inputs: { column: "column", row: "row", filterOptions: "filterOptions", dict: "dict" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8955
8958
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CellHostComponent, decorators: [{
8956
8959
  type: Component,
8957
8960
  args: [{ selector: 'teta-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [""] }]
8958
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { column: [{
8961
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
8959
8962
  type: Input
8960
8963
  }], row: [{
8961
8964
  type: Input
@@ -9300,7 +9303,7 @@ class TableComponent {
9300
9303
  this.startEditRowOrCell(coordinates);
9301
9304
  }
9302
9305
  }
9303
- if (!this.isRow(event.target)) {
9306
+ if (!this.eventIsOnRow(event)) {
9304
9307
  this._svc.startEditRow(null);
9305
9308
  }
9306
9309
  }
@@ -9441,27 +9444,20 @@ class TableComponent {
9441
9444
  this._svc.startEditCell(coordinates);
9442
9445
  }
9443
9446
  }
9444
- getCell(element) {
9445
- if (!element.parentElement) {
9446
- return null;
9447
- }
9448
- if (element.tagName.toLowerCase() === 'teta-cell') {
9449
- return element;
9450
- }
9451
- return this.getCell(element.parentElement);
9447
+ getEventCell(event) {
9448
+ return event.composedPath().find((target) => {
9449
+ var _a;
9450
+ return ((_a = target.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'teta-cell';
9451
+ });
9452
9452
  }
9453
- isRow(element) {
9454
- if (!element.parentElement) {
9455
- return false;
9456
- }
9457
- if (this._elementRef.nativeElement.contains(element) &&
9458
- element.getAttribute('data-row')) {
9459
- return true;
9460
- }
9461
- return this.isRow(element.parentElement);
9453
+ eventIsOnRow(event) {
9454
+ const row = event.composedPath().find((target) => {
9455
+ return (target === null || target === void 0 ? void 0 : target.getAttribute) && (target === null || target === void 0 ? void 0 : target.getAttribute('data-row'));
9456
+ });
9457
+ return row && this._elementRef.nativeElement.contains(row);
9462
9458
  }
9463
9459
  getCoordinates(event) {
9464
- const cell = this.getCell(event.target);
9460
+ const cell = this.getEventCell(event);
9465
9461
  if (cell) {
9466
9462
  const rowIndex = cell.getAttribute('data-row');
9467
9463
  const columnName = cell.getAttribute('data-column');
@@ -10812,12 +10808,15 @@ class TetaChart {
10812
10808
  className: annotation.className,
10813
10809
  };
10814
10810
  });
10815
- const makeAnnotations = d3annotation.annotation().annotations(annotations !== null && annotations !== void 0 ? annotations : []);
10811
+ const makeAnnotations = d3annotation
10812
+ .annotation()
10813
+ .annotations(annotations !== null && annotations !== void 0 ? annotations : []);
10816
10814
  this._chart
10817
10815
  .append('g')
10818
10816
  .attr('class', 'annotations')
10819
10817
  .attr('clip-path', `url(#draw-window-${this.uniqId})`)
10820
- .call(makeAnnotations);
10818
+ .call(makeAnnotations)
10819
+ .lower();
10821
10820
  }
10822
10821
  drawPlotLines() {
10823
10822
  this._chart.selectAll('.plotlines').remove();