Comparing version 7.8.0 to 8.0.0
@@ -0,1 +1,2 @@ | ||
import { core } from '@angular/compiler'; | ||
import { Type } from '@angular/core'; | ||
@@ -11,2 +12,2 @@ export declare type MockedComponent<T> = T & { | ||
export declare function MockComponents(...components: Array<Type<any>>): Array<Type<any>>; | ||
export declare function MockComponent<TComponent>(component: Type<TComponent>): Type<TComponent>; | ||
export declare function MockComponent<TComponent>(component: Type<TComponent>, metaData?: core.Directive): Type<TComponent>; |
@@ -33,6 +33,6 @@ "use strict"; | ||
} | ||
return components.map(MockComponent); | ||
return components.map(function (component) { return MockComponent(component, undefined); }); | ||
} | ||
exports.MockComponents = MockComponents; | ||
function MockComponent(component) { | ||
function MockComponent(component, metaData) { | ||
var cacheHit = cache.get(component); | ||
@@ -42,3 +42,3 @@ if (cacheHit) { | ||
} | ||
var _a = reflect_1.directiveResolver.resolve(component), exportAs = _a.exportAs, inputs = _a.inputs, outputs = _a.outputs, queries = _a.queries, selector = _a.selector; | ||
var _a = metaData || reflect_1.directiveResolver.resolve(component), exportAs = _a.exportAs, inputs = _a.inputs, outputs = _a.outputs, queries = _a.queries, selector = _a.selector; | ||
var template = "<ng-content></ng-content>"; | ||
@@ -60,2 +60,3 @@ var viewChildRefs = new Map(); | ||
read: core_1.ViewContainerRef, | ||
static: query.static | ||
}); | ||
@@ -62,0 +63,0 @@ return "\n <div *ngIf=\"mockRender_" + query.selector + "\" data-key=\"" + query.selector + "\">\n <ng-template #__" + query.selector + "></ng-template>\n </div>\n "; |
@@ -30,3 +30,3 @@ "use strict"; | ||
__decorate([ | ||
core_1.ViewChild(child_component_component_1.ChildComponent), | ||
core_1.ViewChild(child_component_component_1.ChildComponent, { static: true }), | ||
__metadata("design:type", child_component_component_1.ChildComponent) | ||
@@ -33,0 +33,0 @@ ], ExampleComponentContainer.prototype, "childComponent", void 0); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -17,15 +17,15 @@ "use strict"; | ||
__decorate([ | ||
core_1.ContentChild('block1'), | ||
core_1.ContentChild('block1', { static: false }), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], TemplateOutletComponent.prototype, "injectedBlock1", void 0); | ||
__decorate([ | ||
core_1.ContentChild('block2'), | ||
core_1.ContentChild('block2', { static: false }), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], TemplateOutletComponent.prototype, "injectedBlock2", void 0); | ||
__decorate([ | ||
core_1.ContentChild('block3'), | ||
core_1.ContentChild('block3', { static: false }), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], TemplateOutletComponent.prototype, "injectedBlock3", void 0); | ||
__decorate([ | ||
core_1.ViewChild('block4'), | ||
core_1.ViewChild('block4', { static: false }), | ||
__metadata("design:type", core_1.ElementRef) | ||
@@ -32,0 +32,0 @@ ], TemplateOutletComponent.prototype, "ownBlock3", void 0); |
@@ -71,3 +71,3 @@ "use strict"; | ||
__decorate([ | ||
core_1.ViewChild(ExampleDirective), | ||
core_1.ViewChild(ExampleDirective, { static: false }), | ||
__metadata("design:type", ExampleDirective) | ||
@@ -74,0 +74,0 @@ ], ExampleComponentContainer.prototype, "childDirective", void 0); |
{ | ||
"name": "ng-mocks", | ||
"version": "7.8.0", | ||
"version": "8.0.0", | ||
"description": "Functions for creating angular mocks", | ||
@@ -44,15 +44,15 @@ "main": "dist/index.js", | ||
"peerDependencies": { | ||
"@angular/compiler": ">=5.x <=7.x", | ||
"@angular/core": ">=5.x <=7.x", | ||
"@angular/forms": ">=5.x <=7.x" | ||
"@angular/compiler": ">=5.x <=8.x", | ||
"@angular/core": ">=5.x <=8.x", | ||
"@angular/forms": ">=5.x <=8.x" | ||
}, | ||
"devDependencies": { | ||
"@angular/animations": "7.x", | ||
"@angular/common": "7.x", | ||
"@angular/compiler": "7.x", | ||
"@angular/core": "7.x", | ||
"@angular/forms": "7.x", | ||
"@angular/platform-browser": "7.x", | ||
"@angular/platform-browser-dynamic": "7.x", | ||
"@angular/router": "7.x", | ||
"@angular/animations": "8.x", | ||
"@angular/common": "8.x", | ||
"@angular/compiler": "8.x", | ||
"@angular/core": "8.x", | ||
"@angular/forms": "8.x", | ||
"@angular/platform-browser": "8.x", | ||
"@angular/platform-browser-dynamic": "8.x", | ||
"@angular/router": "8.x", | ||
"@types/core-js": "^0.9.43", | ||
@@ -69,9 +69,9 @@ "@types/jasmine": "^2.5.53", | ||
"karma-typescript": "^4.0.0", | ||
"rxjs": "^6.0.0", | ||
"rxjs": "^6.4.0", | ||
"standard-version": "^4.3.0", | ||
"tslint": "^5.11.0", | ||
"tslint-jasmine-rules": "^1.5.1", | ||
"typescript": "3.1.x", | ||
"zone.js": "^0.8.26" | ||
"typescript": "3.4.3", | ||
"zone.js": "^0.9.1" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
283749
2092