@angular/cdk 8.1.0 → 8.1.4
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/bundles/cdk-overlay.umd.js +27 -11
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +84 -9
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +50 -13
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +6 -6
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +14 -13
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/overlay.js +28 -12
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/portal.js +52 -6
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +39 -13
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +2 -2
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/tree.js +13 -12
- package/esm2015/tree.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/overlay.es5.js +27 -11
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/portal.es5.js +81 -6
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +50 -13
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +6 -6
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/tree.es5.js +14 -13
- package/esm5/tree.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-container.d.ts +2 -2
- package/package.json +4 -4
- package/portal/typings/dom-portal-outlet.d.ts +6 -0
- package/portal/typings/index.metadata.json +1 -1
- package/portal/typings/portal-directives.d.ts +12 -0
- package/portal/typings/portal.d.ts +11 -0
- package/portal/typings/public-api.d.ts +0 -3
- package/schematics/ng-update/upgrade-data.js +1 -0
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/input-names-rule.js +3 -3
- package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js +2 -2
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +2936 -2820
- package/schematics/utils/ast.js +0 -2
- package/schematics/utils/ast.js.map +1 -1
- package/schematics/utils/build-component.js +3 -12
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/version-agnostic-typescript.js +12 -4
- package/schematics/utils/version-agnostic-typescript.js.map +1 -1
- package/scrolling/typings/index.metadata.json +1 -1
- package/scrolling/typings/virtual-scroll-viewport.d.ts +7 -5
- package/tree/typings/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-container.d.ts +2 -2
- package/typings/esm5/portal/dom-portal-outlet.d.ts +6 -0
- package/typings/esm5/portal/index.metadata.json +1 -1
- package/typings/esm5/portal/portal-directives.d.ts +12 -0
- package/typings/esm5/portal/portal.d.ts +11 -0
- package/typings/esm5/portal/public-api.d.ts +0 -3
- package/typings/esm5/scrolling/index.metadata.json +1 -1
- package/typings/esm5/scrolling/virtual-scroll-viewport.d.ts +7 -5
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-container.d.ts +2 -2
- package/typings/portal/dom-portal-outlet.d.ts +6 -0
- package/typings/portal/index.metadata.json +1 -1
- package/typings/portal/portal-directives.d.ts +12 -0
- package/typings/portal/portal.d.ts +11 -0
- package/typings/portal/public-api.d.ts +0 -3
- package/typings/scrolling/index.metadata.json +1 -1
- package/typings/scrolling/virtual-scroll-viewport.d.ts +7 -5
- package/typings/tree/index.metadata.json +1 -1
package/esm2015/portal.js
CHANGED
|
@@ -266,6 +266,13 @@ class BasePortalOutlet {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* @deprecated Use `BasePortalOutlet` instead.
|
|
271
|
+
* \@breaking-change 9.0.0
|
|
272
|
+
* @abstract
|
|
273
|
+
*/
|
|
274
|
+
class BasePortalHost extends BasePortalOutlet {
|
|
275
|
+
}
|
|
269
276
|
|
|
270
277
|
/**
|
|
271
278
|
* @fileoverview added by tsickle
|
|
@@ -383,6 +390,12 @@ class DomPortalOutlet extends BasePortalOutlet {
|
|
|
383
390
|
return (/** @type {?} */ (((/** @type {?} */ (componentRef.hostView))).rootNodes[0]));
|
|
384
391
|
}
|
|
385
392
|
}
|
|
393
|
+
/**
|
|
394
|
+
* @deprecated Use `DomPortalOutlet` instead.
|
|
395
|
+
* \@breaking-change 9.0.0
|
|
396
|
+
*/
|
|
397
|
+
class DomPortalHost extends DomPortalOutlet {
|
|
398
|
+
}
|
|
386
399
|
|
|
387
400
|
/**
|
|
388
401
|
* @fileoverview added by tsickle
|
|
@@ -403,7 +416,7 @@ class CdkPortal extends TemplatePortal {
|
|
|
403
416
|
}
|
|
404
417
|
CdkPortal.decorators = [
|
|
405
418
|
{ type: Directive, args: [{
|
|
406
|
-
selector: '[
|
|
419
|
+
selector: '[cdkPortal]',
|
|
407
420
|
exportAs: 'cdkPortal',
|
|
408
421
|
},] },
|
|
409
422
|
];
|
|
@@ -412,6 +425,22 @@ CdkPortal.ctorParameters = () => [
|
|
|
412
425
|
{ type: TemplateRef },
|
|
413
426
|
{ type: ViewContainerRef }
|
|
414
427
|
];
|
|
428
|
+
/**
|
|
429
|
+
* @deprecated Use `CdkPortal` instead.
|
|
430
|
+
* \@breaking-change 9.0.0
|
|
431
|
+
*/
|
|
432
|
+
class TemplatePortalDirective extends CdkPortal {
|
|
433
|
+
}
|
|
434
|
+
TemplatePortalDirective.decorators = [
|
|
435
|
+
{ type: Directive, args: [{
|
|
436
|
+
selector: '[cdk-portal], [portal]',
|
|
437
|
+
exportAs: 'cdkPortal',
|
|
438
|
+
providers: [{
|
|
439
|
+
provide: CdkPortal,
|
|
440
|
+
useExisting: TemplatePortalDirective
|
|
441
|
+
}]
|
|
442
|
+
},] },
|
|
443
|
+
];
|
|
415
444
|
/**
|
|
416
445
|
* Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
|
|
417
446
|
* directly attached to it, enabling declarative use.
|
|
@@ -537,8 +566,8 @@ class CdkPortalOutlet extends BasePortalOutlet {
|
|
|
537
566
|
}
|
|
538
567
|
CdkPortalOutlet.decorators = [
|
|
539
568
|
{ type: Directive, args: [{
|
|
540
|
-
selector: '[cdkPortalOutlet]
|
|
541
|
-
exportAs: 'cdkPortalOutlet
|
|
569
|
+
selector: '[cdkPortalOutlet]',
|
|
570
|
+
exportAs: 'cdkPortalOutlet',
|
|
542
571
|
inputs: ['portal: cdkPortalOutlet']
|
|
543
572
|
},] },
|
|
544
573
|
];
|
|
@@ -550,12 +579,29 @@ CdkPortalOutlet.ctorParameters = () => [
|
|
|
550
579
|
CdkPortalOutlet.propDecorators = {
|
|
551
580
|
attached: [{ type: Output }]
|
|
552
581
|
};
|
|
582
|
+
/**
|
|
583
|
+
* @deprecated Use `CdkPortalOutlet` instead.
|
|
584
|
+
* \@breaking-change 9.0.0
|
|
585
|
+
*/
|
|
586
|
+
class PortalHostDirective extends CdkPortalOutlet {
|
|
587
|
+
}
|
|
588
|
+
PortalHostDirective.decorators = [
|
|
589
|
+
{ type: Directive, args: [{
|
|
590
|
+
selector: '[cdkPortalHost], [portalHost]',
|
|
591
|
+
exportAs: 'cdkPortalHost',
|
|
592
|
+
inputs: ['portal: cdkPortalHost'],
|
|
593
|
+
providers: [{
|
|
594
|
+
provide: CdkPortalOutlet,
|
|
595
|
+
useExisting: PortalHostDirective
|
|
596
|
+
}]
|
|
597
|
+
},] },
|
|
598
|
+
];
|
|
553
599
|
class PortalModule {
|
|
554
600
|
}
|
|
555
601
|
PortalModule.decorators = [
|
|
556
602
|
{ type: NgModule, args: [{
|
|
557
|
-
exports: [CdkPortal, CdkPortalOutlet],
|
|
558
|
-
declarations: [CdkPortal, CdkPortalOutlet],
|
|
603
|
+
exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
|
604
|
+
declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
|
559
605
|
},] },
|
|
560
606
|
];
|
|
561
607
|
|
|
@@ -603,5 +649,5 @@ class PortalInjector {
|
|
|
603
649
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
604
650
|
*/
|
|
605
651
|
|
|
606
|
-
export {
|
|
652
|
+
export { Portal, ComponentPortal, TemplatePortal, BasePortalOutlet, BasePortalHost, DomPortalOutlet, DomPortalHost, CdkPortal, TemplatePortalDirective, CdkPortalOutlet, PortalHostDirective, PortalModule, PortalInjector };
|
|
607
653
|
//# sourceMappingURL=portal.js.map
|
package/esm2015/portal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.js","sources":["../../../src/cdk/portal/portal-injector.ts","../../../src/cdk/portal/portal-directives.ts","../../../src/cdk/portal/dom-portal-outlet.ts","../../../src/cdk/portal/portal.ts","../../../src/cdk/portal/portal-errors.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n */\nexport class PortalInjector implements Injector {\n constructor(\n private _parentInjector: Injector,\n private _customTokens: WeakMap<any, any>) { }\n\n get(token: any, notFoundValue?: any): any {\n const value = this._customTokens.get(token);\n\n if (typeof value !== 'undefined') {\n return value;\n }\n\n return this._parentInjector.get<any>(token, notFoundValue);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal} from './portal';\n\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdk-portal], [cdkPortal], [portal]',\n exportAs: 'cdkPortal',\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet], [cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalOutlet, cdkPortalHost',\n inputs: ['portal: cdkPortalOutlet']\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _viewContainerRef: ViewContainerRef) {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedPortal = null;\n this._attachedRef = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(\n componentFactory, viewContainerRef.length,\n portal.injector || viewContainerRef.injector);\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortlHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n}\n\n\n@NgModule({\n exports: [CdkPortal, CdkPortalOutlet],\n declarations: [CdkPortal, CdkPortalOutlet],\n})\nexport class PortalModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n ApplicationRef,\n Injector,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, TemplatePortal} from './portal';\n\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef,\n private _defaultInjector: Injector) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(\n componentFactory,\n portal.viewContainerRef.length,\n portal.injector || portal.viewContainerRef.injector);\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n viewRef.detectChanges();\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n this.setDisposeFn((() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n }));\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Clears out a portal from the DOM.\n */\n dispose(): void {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this.outletElement.parentNode.removeChild(this.outletElement);\n }\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n ComponentFactoryResolver,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n this._attachedHost = host;\n return <T> host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host == null) {\n throwNoPortalAttachedError();\n } else {\n this._attachedHost = null;\n host.detach();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** [Optional] Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n * Defaults to using the resolver from the outlet that the portal is attached to.\n */\n componentFactoryResolver?: ComponentFactoryResolver | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n componentFactoryResolver?: ComponentFactoryResolver | null) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef: TemplateRef<C>;\n\n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef: ViewContainerRef;\n\n /** Contextual data to be passed in to the embedded view. */\n context: C | undefined;\n\n constructor(template: TemplateRef<C>, viewContainerRef: ViewContainerRef, context?: C) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n\n/** A `PortalOutlet` is an space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n }\n\n throwUnknownPortalTypeError();\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AIYA,AAAA,SAAgB,oBAAoB,GAApC;IACE,MAAM,KAAK,CAAC,iCAAiC,CAAC,CAAC;CAChD;;;;;;AAMD,AAAA,SAAgB,+BAA+B,GAA/C;IACE,MAAM,KAAK,CAAC,oCAAoC,CAAC,CAAC;CACnD;;;;;;AAMD,AAAA,SAAgB,qCAAqC,GAArD;IACE,MAAM,KAAK,CAAC,6CAA6C,CAAC,CAAC;CAC5D;;;;;;AAMD,AAAA,SAAgB,2BAA2B,GAA3C;IACE,MAAM,KAAK,CAAC,+EAA+E;QAC/E,wCAAwC,CAAC,CAAC;CACvD;;;;;;AAMD,AAAA,SAAgB,0BAA0B,GAA1C;IACE,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;CACrE;;;;;;AAMD,AAAA,SAAgB,0BAA0B,GAA1C;IAC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EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;gBACrC,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;aAC3C,EAAD,EAAA;;;;;;;;;;;;;ADrJA,AAAA,MAAa,cAAc,CAA3B;;;;;IACE,WAAF,CACY,eAAyB,EACzB,aAAgC,EAF5C;QACY,IAAZ,CAAA,eAA2B,GAAf,eAAe,CAAU;QACzB,IAAZ,CAAA,aAAyB,GAAb,aAAa,CAAmB;KAAK;;;;;;IAE/C,GAAG,CAAC,KAAU,EAAE,aAAmB,EAArC;;QACA,MAAU,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAA/C;QAEI,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAM,KAAK,EAAE,aAAa,CAAC,CAAC;KAC5D;CACF;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"portal.js","sources":["../../../src/cdk/portal/portal-injector.ts","../../../src/cdk/portal/portal-directives.ts","../../../src/cdk/portal/dom-portal-outlet.ts","../../../src/cdk/portal/portal.ts","../../../src/cdk/portal/portal-errors.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n */\nexport class PortalInjector implements Injector {\n constructor(\n private _parentInjector: Injector,\n private _customTokens: WeakMap<any, any>) { }\n\n get(token: any, notFoundValue?: any): any {\n const value = this._customTokens.get(token);\n\n if (typeof value !== 'undefined') {\n return value;\n }\n\n return this._parentInjector.get<any>(token, notFoundValue);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal} from './portal';\n\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [{\n provide: CdkPortal,\n useExisting: TemplatePortalDirective\n }]\n})\nexport class TemplatePortalDirective extends CdkPortal {}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n inputs: ['portal: cdkPortalOutlet']\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _viewContainerRef: ViewContainerRef) {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedPortal = null;\n this._attachedRef = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(\n componentFactory, viewContainerRef.length,\n portal.injector || viewContainerRef.injector);\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortlHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n}\n\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost'],\n providers: [{\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective\n }]\n})\nexport class PortalHostDirective extends CdkPortalOutlet {}\n\n\n@NgModule({\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n})\nexport class PortalModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n ApplicationRef,\n Injector,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, TemplatePortal} from './portal';\n\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef,\n private _defaultInjector: Injector) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(\n componentFactory,\n portal.viewContainerRef.length,\n portal.injector || portal.viewContainerRef.injector);\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n viewRef.detectChanges();\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n this.setDisposeFn((() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n }));\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Clears out a portal from the DOM.\n */\n dispose(): void {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this.outletElement.parentNode.removeChild(this.outletElement);\n }\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nexport class DomPortalHost extends DomPortalOutlet {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n ComponentFactoryResolver,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n this._attachedHost = host;\n return <T> host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host == null) {\n throwNoPortalAttachedError();\n } else {\n this._attachedHost = null;\n host.detach();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** [Optional] Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n * Defaults to using the resolver from the outlet that the portal is attached to.\n */\n componentFactoryResolver?: ComponentFactoryResolver | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n componentFactoryResolver?: ComponentFactoryResolver | null) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef: TemplateRef<C>;\n\n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef: ViewContainerRef;\n\n /** Contextual data to be passed in to the embedded view. */\n context: C | undefined;\n\n constructor(template: TemplateRef<C>, viewContainerRef: ViewContainerRef, context?: C) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n\n/** A `PortalOutlet` is an space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * @deprecated Use `PortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nexport type PortalHost = PortalOutlet;\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n }\n\n throwUnknownPortalTypeError();\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nexport abstract class BasePortalHost extends BasePortalOutlet {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AIYA,AAAA,SAAgB,oBAAoB,GAApC;IACE,MAAM,KAAK,CAAC,iCAAiC,CAAC,CAAC;CAChD;;;;;;AAMD,AAAA,SAAgB,+BAA+B,GAA/C;IACE,MAAM,KAAK,CAAC,oCAAoC,CAAC,CAAC;CACnD;;;;;;AAMD,AAAA,SAAgB,qCAAqC,GAArD;IACE,MAAM,KAAK,CAAC,6CAA6C,CAAC,CAAC;CAC5D;;;;;;AAMD,AAAA,SAAgB,2BAA2B,GAA3C;IACE,MAAM,KAAK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,CAAA,aAAyB,GAAb,aAAa,CAAmB;KAAK;;;;;;IAE/C,GAAG,CAAC,KAAU,EAAE,aAAmB,EAArC;;QACA,MAAU,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAA/C;QAEI,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAM,KAAK,EAAE,aAAa,CAAC,CAAC;KAC5D;CACF;;;;;;;;;;;;;;"}
|
package/esm2015/scrolling.js
CHANGED
|
@@ -743,10 +743,7 @@ class CdkVirtualScrollViewport extends CdkScrollable {
|
|
|
743
743
|
* Emits when the rendered range changes.
|
|
744
744
|
*/
|
|
745
745
|
this._renderedRangeSubject = new Subject();
|
|
746
|
-
|
|
747
|
-
* The direction the viewport scrolls.
|
|
748
|
-
*/
|
|
749
|
-
this.orientation = 'vertical';
|
|
746
|
+
this._orientation = 'vertical';
|
|
750
747
|
// Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
|
|
751
748
|
// strategy lazily (i.e. only if the user is actually listening to the events). We do this because
|
|
752
749
|
// depending on how the strategy calculates the scrolled index, it may come at a cost to
|
|
@@ -773,15 +770,18 @@ class CdkVirtualScrollViewport extends CdkScrollable {
|
|
|
773
770
|
* A stream that emits whenever the rendered range changes.
|
|
774
771
|
*/
|
|
775
772
|
this.renderedRangeStream = this._renderedRangeSubject.asObservable();
|
|
776
|
-
/**
|
|
777
|
-
* The transform used to scale the spacer to the same size as all content, including content that
|
|
778
|
-
* is not currently rendered.
|
|
779
|
-
*/
|
|
780
|
-
this._totalContentSizeTransform = '';
|
|
781
773
|
/**
|
|
782
774
|
* The total size of all content (in pixels), including content that is not currently rendered.
|
|
783
775
|
*/
|
|
784
776
|
this._totalContentSize = 0;
|
|
777
|
+
/**
|
|
778
|
+
* A string representing the `style.width` property value to be used for the spacer element.
|
|
779
|
+
*/
|
|
780
|
+
this._totalContentWidth = '';
|
|
781
|
+
/**
|
|
782
|
+
* A string representing the `style.height` property value to be used for the spacer element.
|
|
783
|
+
*/
|
|
784
|
+
this._totalContentHeight = '';
|
|
785
785
|
/**
|
|
786
786
|
* The currently rendered range of indices.
|
|
787
787
|
*/
|
|
@@ -815,6 +815,23 @@ class CdkVirtualScrollViewport extends CdkScrollable {
|
|
|
815
815
|
throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
+
/**
|
|
819
|
+
* The direction the viewport scrolls.
|
|
820
|
+
* @return {?}
|
|
821
|
+
*/
|
|
822
|
+
get orientation() {
|
|
823
|
+
return this._orientation;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @param {?} orientation
|
|
827
|
+
* @return {?}
|
|
828
|
+
*/
|
|
829
|
+
set orientation(orientation) {
|
|
830
|
+
if (this._orientation !== orientation) {
|
|
831
|
+
this._orientation = orientation;
|
|
832
|
+
this._calculateSpacerSize();
|
|
833
|
+
}
|
|
834
|
+
}
|
|
818
835
|
/**
|
|
819
836
|
* @return {?}
|
|
820
837
|
*/
|
|
@@ -933,9 +950,7 @@ class CdkVirtualScrollViewport extends CdkScrollable {
|
|
|
933
950
|
setTotalContentSize(size) {
|
|
934
951
|
if (this._totalContentSize !== size) {
|
|
935
952
|
this._totalContentSize = size;
|
|
936
|
-
|
|
937
|
-
const axis = this.orientation == 'horizontal' ? 'X' : 'Y';
|
|
938
|
-
this._totalContentSizeTransform = `scale${axis}(${this._totalContentSize})`;
|
|
953
|
+
this._calculateSpacerSize();
|
|
939
954
|
this._markChangeDetectionNeeded();
|
|
940
955
|
}
|
|
941
956
|
}
|
|
@@ -1136,10 +1151,21 @@ class CdkVirtualScrollViewport extends CdkScrollable {
|
|
|
1136
1151
|
fn();
|
|
1137
1152
|
}
|
|
1138
1153
|
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Calculates the `style.width` and `style.height` for the spacer element.
|
|
1156
|
+
* @private
|
|
1157
|
+
* @return {?}
|
|
1158
|
+
*/
|
|
1159
|
+
_calculateSpacerSize() {
|
|
1160
|
+
this._totalContentHeight =
|
|
1161
|
+
this.orientation === 'horizontal' ? '' : `${this._totalContentSize}px`;
|
|
1162
|
+
this._totalContentWidth =
|
|
1163
|
+
this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '';
|
|
1164
|
+
}
|
|
1139
1165
|
}
|
|
1140
1166
|
CdkVirtualScrollViewport.decorators = [
|
|
1141
1167
|
{ type: Component, args: [{selector: 'cdk-virtual-scroll-viewport',
|
|
1142
|
-
template: "<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\"><ng-content></ng-content></div><div class=\"cdk-virtual-scroll-spacer\" [style.
|
|
1168
|
+
template: "<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\"><ng-content></ng-content></div><div class=\"cdk-virtual-scroll-spacer\" [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>",
|
|
1143
1169
|
styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:0}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:0}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}"],
|
|
1144
1170
|
host: {
|
|
1145
1171
|
'class': 'cdk-virtual-scroll-viewport',
|