Skip to content

Commit

Permalink
feat(a13): recursive declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
satanTime committed Jan 9, 2022
1 parent 750e13a commit 396573f
Show file tree
Hide file tree
Showing 56 changed files with 619 additions and 756 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,9 @@ workflows:
Testing:
jobs:
- Core
- E2E:
requires:
- Core
# - E2E:
# requires:
# - Core
# - 'Core IE':
# requires:
# - Core
Expand Down Expand Up @@ -999,9 +999,9 @@ workflows:
- 'Angular Jest ES2020 Ivy':
requires:
- Angular Install
# - 'Angular Min ES5 Ivy':
# requires:
# - Angular Install
# - 'Angular Min ES2015 Ivy':
# requires:
# - Angular Install
# - 'Angular Min ES5 Ivy':
# requires:
# - Angular Install
# - 'Angular Min ES2015 Ivy':
# requires:
# - Angular Install
1 change: 0 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude_patterns:
- 'examples/'
- 'node_modules/'
- 'test-reports/'
- 'tests-angular/'
- 'tests-failures/'
- 'tests-performance/'
- 'tests/'
Expand Down
65 changes: 65 additions & 0 deletions e2e/a13/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions e2e/a13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@
},
"dependencies": {
"@angular/animations": "13.1.1",
"@angular/cdk": "13.1.1",
"@angular/common": "13.1.1",
"@angular/compiler": "13.1.1",
"@angular/core": "13.1.1",
"@angular/forms": "13.1.1",
"@angular/material": "13.1.1",
"@angular/platform-browser": "13.1.1",
"@angular/platform-browser-dynamic": "13.1.1",
"@angular/router": "13.1.1",
"@ng-select/ng-select": "8.1.1",
"@ngrx/effects": "13.0.2",
"@ngrx/store": "13.0.2",
"@ngrx/store-devtools": "13.0.2",
"primeng": "13.0.4",
"rxjs": "6.6.7",
"tslib": "2.3.1",
"zone.js": "0.11.4"
Expand Down
86 changes: 86 additions & 0 deletions e2e/a13/src/e2e/double-declarations/fixtures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import {
Component,
ContentChild,
ContentChildren,
Directive,
EventEmitter,
HostBinding,
HostListener,
Input,
Output,
QueryList,
ViewChild,
ViewChildren,
} from '@angular/core';

@Directive({
selector: 'div',
})
export class DivCls {
@Input() public prop: number | null = null;
}

@Directive({
selector: 'base1',
})
@Directive({
selector: 'base2',
})
export class BaseCls {
@ContentChild(DivCls) public contentChildBase?: DivCls;
@ContentChildren(DivCls) public contentChildrenBase?: QueryList<DivCls>;

@HostBinding('attr.base1') public hostBase1: any;
@HostBinding('attr.base2') public hostBase2: any;
public hostBase3 = '';

@Output() @Input() public mix1: EventEmitter<void> | string = new EventEmitter();

@Input() @Output() public mix2: EventEmitter<void> | string = new EventEmitter();
@Input() public prop1: EventEmitter<void> | string = '';

@Input('prop2alias') public prop2: EventEmitter<void> | string = '';
@Input('prop3alias') public prop3: EventEmitter<void> | string = '';

@Input() public propBase1: EventEmitter<void> | string = '';
@Output() public propBase2 = new EventEmitter<void>();

@ViewChild(DivCls) public viewChildBase?: DivCls;
@ViewChildren(DivCls) public viewChildrenBase?: QueryList<DivCls>;

@HostListener('focus') public hostBaseHandler3() {
this.hostBase3 = 'base3';
}
}

@Component({
selector: 'override1',
template: `override1<ng-content></ng-content>`,
})
@Component({
selector: 'override2',
template: `override2<ng-content></ng-content>`,
})
export class OverrideCls extends BaseCls {
@ContentChild(DivCls) public contentChildOverride?: DivCls;
@ContentChildren(DivCls) public contentChildrenOverride?: QueryList<DivCls>;

@HostBinding('attr.override2') public hostBase2: any;
@HostBinding('attr.override1') public hostOverride1: any;
public hostOverride3 = '';

@Output() public prop1: EventEmitter<void> | string = new EventEmitter();
@Input('override2alias') public prop2: EventEmitter<void> | string = '';

@Input('override3alias') public prop3: EventEmitter<void> | string = '';
@Input() public propOverride1: EventEmitter<void> | string = '';

@Output() public propOverride2 = new EventEmitter<void>();

@ContentChild(DivCls) public viewChildBase?: DivCls;
@ContentChildren(DivCls) public viewChildrenBase?: QueryList<DivCls>;

@HostListener('click') public hostBaseHandler3() {
this.hostOverride3 = 'override3';
}
}
Loading

0 comments on commit 396573f

Please sign in to comment.