@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.
@@ -1151,12 +1151,12 @@ class DropdownBase {
1151
1151
  }
1152
1152
  }
1153
1153
  closeDropdown() {
1154
- if (this._body && this.container.contains(this._body)) {
1154
+ if (this.open && this._body && this.container.contains(this._body)) {
1155
1155
  this._renderer.removeChild(this.container, this._body);
1156
+ this._open = false;
1157
+ this._body = null;
1158
+ this.openChange.emit(this.open);
1156
1159
  }
1157
- this._open = false;
1158
- this._body = null;
1159
- this.openChange.emit(this.open);
1160
1160
  }
1161
1161
  openDropdown() {
1162
1162
  if (this._open || !this._content || this.disabled) {
@@ -2620,7 +2620,7 @@ class OnlyNumberDirective {
2620
2620
  if (this.tetaOnlyNumber === false) {
2621
2621
  return;
2622
2622
  }
2623
- value = value.replace(',', '.');
2623
+ value = value.replace(',', '.').trim();
2624
2624
  let regex = this._integerUnsigned;
2625
2625
  if (!this.allowDecimals && !this.allowSign) {
2626
2626
  regex = this._integerUnsigned;
@@ -2672,7 +2672,7 @@ class OnlyNumberDirective {
2672
2672
  if (value === '-0.0') {
2673
2673
  value = '0.0';
2674
2674
  }
2675
- const valid = new RegExp(regex).test(value);
2675
+ const valid = new RegExp(regex).test(value.toString());
2676
2676
  this._control.control.setValue(valid ? value : this._previousValue ?? 0);
2677
2677
  }
2678
2678
  }
@@ -3531,6 +3531,7 @@ class TextFieldComponent {
3531
3531
  this.placeholder = '';
3532
3532
  this.disabled = false;
3533
3533
  this.onlyNumber = false;
3534
+ this.tabindex = 0;
3534
3535
  this.textField = true;
3535
3536
  this.value = '';
3536
3537
  }
@@ -3542,6 +3543,9 @@ class TextFieldComponent {
3542
3543
  this.input.nativeElement.blur();
3543
3544
  }
3544
3545
  }
3546
+ emitBlur() {
3547
+ this.onTouched();
3548
+ }
3545
3549
  registerOnChange(fn) {
3546
3550
  this.onChange = fn;
3547
3551
  }
@@ -3556,17 +3560,19 @@ class TextFieldComponent {
3556
3560
  this.value = input;
3557
3561
  this._cdr.detectChanges();
3558
3562
  }
3559
- onChange(input) { }
3560
- onTouched(input) { }
3563
+ onChange(input) {
3564
+ }
3565
+ onTouched() {
3566
+ }
3561
3567
  }
3562
3568
  TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3563
- 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: [
3569
+ 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: [
3564
3570
  {
3565
3571
  provide: NG_VALUE_ACCESSOR,
3566
3572
  useExisting: forwardRef(() => TextFieldComponent),
3567
3573
  multi: true,
3568
3574
  },
3569
- ], 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 });
3575
+ ], 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 });
3570
3576
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, decorators: [{
3571
3577
  type: Component,
3572
3578
  args: [{ selector: 'teta-text-field', providers: [
@@ -3575,7 +3581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
3575
3581
  useExisting: forwardRef(() => TextFieldComponent),
3576
3582
  multi: true,
3577
3583
  },
3578
- ], 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: [""] }]
3584
+ ], 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: [""] }]
3579
3585
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { placeholder: [{
3580
3586
  type: Input
3581
3587
  }], leftIconName: [{
@@ -3595,6 +3601,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
3595
3601
  }], input: [{
3596
3602
  type: ViewChild,
3597
3603
  args: ['input', { static: false }]
3604
+ }], tabindex: [{
3605
+ type: HostBinding,
3606
+ args: ['attr.tabindex']
3598
3607
  }], textField: [{
3599
3608
  type: HostBinding,
3600
3609
  args: ['class.text-field']
@@ -4122,9 +4131,8 @@ const getFilterComponent = (item) => filterComponentsMap.has(item.filterType)
4122
4131
  : StringFilterComponent;
4123
4132
 
4124
4133
  class FilterHostComponent {
4125
- constructor(viewContainerRef, componentFactoryResolver) {
4134
+ constructor(viewContainerRef) {
4126
4135
  this.viewContainerRef = viewContainerRef;
4127
- this.componentFactoryResolver = componentFactoryResolver;
4128
4136
  this.filterChanged = new EventEmitter();
4129
4137
  this._alive = true;
4130
4138
  }
@@ -4153,9 +4161,8 @@ class FilterHostComponent {
4153
4161
  if (!FilterComponentBase.isPrototypeOf(this._column.filterComponent)) {
4154
4162
  this._column.filterComponent = getFilterComponent(this._column);
4155
4163
  }
4156
- const compFactory = this.componentFactoryResolver.resolveComponentFactory(this._column.filterComponent);
4157
4164
  this._componentRef =
4158
- this.viewContainerRef.createComponent(compFactory);
4165
+ this.viewContainerRef.createComponent(this._column.filterComponent);
4159
4166
  this._componentRef.instance.column = this._column;
4160
4167
  this._componentRef.instance.state = this._state;
4161
4168
  this._componentRef.instance.filterOptions = this._filterOptions;
@@ -4171,7 +4178,7 @@ class FilterHostComponent {
4171
4178
  this._alive = false;
4172
4179
  }
4173
4180
  }
4174
- 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 });
4181
+ FilterHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
4175
4182
  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 });
4176
4183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, decorators: [{
4177
4184
  type: Component,
@@ -4181,7 +4188,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
4181
4188
  styles: [],
4182
4189
  changeDetection: ChangeDetectionStrategy.OnPush,
4183
4190
  }]
4184
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { column: [{
4191
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
4185
4192
  type: Input
4186
4193
  }], state: [{
4187
4194
  type: Input
@@ -7608,9 +7615,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
7608
7615
  }] } });
7609
7616
 
7610
7617
  class HeadCellHostComponent {
7611
- constructor(viewContainerRef, componentFactoryResolver) {
7618
+ constructor(viewContainerRef) {
7612
7619
  this.viewContainerRef = viewContainerRef;
7613
- this.componentFactoryResolver = componentFactoryResolver;
7614
7620
  }
7615
7621
  set column(column) {
7616
7622
  this._column = column;
@@ -7625,19 +7631,18 @@ class HeadCellHostComponent {
7625
7631
  if (!HeadCellComponentBase.isPrototypeOf(this.column.headCellComponent)) {
7626
7632
  this.column.headCellComponent = DefaultHeadCellComponent;
7627
7633
  }
7628
- const compFactory = this.componentFactoryResolver.resolveComponentFactory(this.column.headCellComponent);
7629
7634
  this.componentRef =
7630
- this.viewContainerRef.createComponent(compFactory);
7635
+ this.viewContainerRef.createComponent(this.column.headCellComponent);
7631
7636
  this.componentRef.instance.column = this.column;
7632
7637
  this.init = true;
7633
7638
  }
7634
7639
  }
7635
- 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 });
7640
+ HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
7636
7641
  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 });
7637
7642
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, decorators: [{
7638
7643
  type: Component,
7639
7644
  args: [{ selector: 'teta-head-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
7640
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { column: [{
7645
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
7641
7646
  type: Input
7642
7647
  }] } });
7643
7648
 
@@ -8678,7 +8683,7 @@ class DateCellComponent extends CellComponentBase {
8678
8683
  super.ngOnInit();
8679
8684
  }
8680
8685
  setValue(value) {
8681
- this.row.data[this.column.name] = value;
8686
+ this.row.data[this.column.name] = value ? new Date(value) : value;
8682
8687
  this.valueChanged();
8683
8688
  }
8684
8689
  startEdit(initiator, type) {
@@ -8694,10 +8699,10 @@ class DateCellComponent extends CellComponentBase {
8694
8699
  }
8695
8700
  }
8696
8701
  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 });
8697
- 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 });
8702
+ 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 });
8698
8703
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, decorators: [{
8699
8704
  type: Component,
8700
- 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: [""] }]
8705
+ 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: [""] }]
8701
8706
  }], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
8702
8707
  type: Input
8703
8708
  }], row: [{
@@ -8853,17 +8858,15 @@ const getCellComponent = (column) => cellComponentsMap.has(column.filterType)
8853
8858
  : StringCellComponent;
8854
8859
 
8855
8860
  class CellHostComponent {
8856
- constructor(viewContainerRef, componentFactoryResolver) {
8861
+ constructor(viewContainerRef) {
8857
8862
  this.viewContainerRef = viewContainerRef;
8858
- this.componentFactoryResolver = componentFactoryResolver;
8859
8863
  this._init = false;
8860
8864
  }
8861
8865
  ngOnInit() {
8862
8866
  if (!CellComponentBase.isPrototypeOf(this.column.cellComponent)) {
8863
8867
  this.column.cellComponent = getCellComponent(this.column);
8864
8868
  }
8865
- const compFactory = this.componentFactoryResolver.resolveComponentFactory(this.column.cellComponent);
8866
- this._componentRef = this.viewContainerRef.createComponent(compFactory);
8869
+ this._componentRef = this.viewContainerRef.createComponent(this.column.cellComponent);
8867
8870
  this._componentRef.instance.column = this.column;
8868
8871
  this._componentRef.instance.row = this.row;
8869
8872
  this._componentRef.instance.filterOptions = this.filterOptions;
@@ -8885,12 +8888,12 @@ class CellHostComponent {
8885
8888
  }
8886
8889
  }
8887
8890
  }
8888
- 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 });
8891
+ CellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
8889
8892
  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 });
8890
8893
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CellHostComponent, decorators: [{
8891
8894
  type: Component,
8892
8895
  args: [{ selector: 'teta-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [""] }]
8893
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { column: [{
8896
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
8894
8897
  type: Input
8895
8898
  }], row: [{
8896
8899
  type: Input
@@ -9226,7 +9229,7 @@ class TableComponent {
9226
9229
  this.startEditRowOrCell(coordinates);
9227
9230
  }
9228
9231
  }
9229
- if (!this.isRow(event.target)) {
9232
+ if (!this.eventIsOnRow(event)) {
9230
9233
  this._svc.startEditRow(null);
9231
9234
  }
9232
9235
  }
@@ -9364,27 +9367,19 @@ class TableComponent {
9364
9367
  this._svc.startEditCell(coordinates);
9365
9368
  }
9366
9369
  }
9367
- getCell(element) {
9368
- if (!element.parentElement) {
9369
- return null;
9370
- }
9371
- if (element.tagName.toLowerCase() === 'teta-cell') {
9372
- return element;
9373
- }
9374
- return this.getCell(element.parentElement);
9370
+ getEventCell(event) {
9371
+ return event.composedPath().find((target) => {
9372
+ return target.tagName?.toLowerCase() === 'teta-cell';
9373
+ });
9375
9374
  }
9376
- isRow(element) {
9377
- if (!element.parentElement) {
9378
- return false;
9379
- }
9380
- if (this._elementRef.nativeElement.contains(element) &&
9381
- element.getAttribute('data-row')) {
9382
- return true;
9383
- }
9384
- return this.isRow(element.parentElement);
9375
+ eventIsOnRow(event) {
9376
+ const row = event.composedPath().find((target) => {
9377
+ return target?.getAttribute && target?.getAttribute('data-row');
9378
+ });
9379
+ return row && this._elementRef.nativeElement.contains(row);
9385
9380
  }
9386
9381
  getCoordinates(event) {
9387
- const cell = this.getCell(event.target);
9382
+ const cell = this.getEventCell(event);
9388
9383
  if (cell) {
9389
9384
  const rowIndex = cell.getAttribute('data-row');
9390
9385
  const columnName = cell.getAttribute('data-column');
@@ -10731,12 +10726,15 @@ class TetaChart {
10731
10726
  className: annotation.className,
10732
10727
  };
10733
10728
  });
10734
- const makeAnnotations = d3annotation.annotation().annotations(annotations ?? []);
10729
+ const makeAnnotations = d3annotation
10730
+ .annotation()
10731
+ .annotations(annotations ?? []);
10735
10732
  this._chart
10736
10733
  .append('g')
10737
10734
  .attr('class', 'annotations')
10738
10735
  .attr('clip-path', `url(#draw-window-${this.uniqId})`)
10739
- .call(makeAnnotations);
10736
+ .call(makeAnnotations)
10737
+ .lower();
10740
10738
  }
10741
10739
  drawPlotLines() {
10742
10740
  this._chart.selectAll('.plotlines').remove();