@angular/cdk 8.0.0-beta.2 → 8.0.0
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/README.md +2 -2
- package/_overlay.scss +4 -4
- package/bundles/cdk-a11y.umd.js +227 -79
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +20 -8
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +5 -5
- package/bundles/cdk-bidi.umd.min.js +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +5 -5
- package/bundles/cdk-collections.umd.js +38 -15
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +571 -180
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +7 -3
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +83 -30
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +30 -11
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +229 -108
- 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-platform.umd.js +17 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +32 -13
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +184 -62
- 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 +30 -12
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +384 -74
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +61 -21
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +85 -29
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +2 -2
- 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/drag-drop/typings/directives/drag.d.ts +11 -2
- package/drag-drop/typings/drag-events.d.ts +17 -0
- package/drag-drop/typings/drag-ref.d.ts +9 -5
- package/drag-drop/typings/drop-list-ref.d.ts +9 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +229 -81
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +22 -10
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +8 -8
- package/esm2015/cdk.js +4 -4
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +7 -7
- package/esm2015/collections.js +41 -18
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +540 -181
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +9 -5
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +89 -36
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +33 -14
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +232 -110
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +20 -13
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +34 -15
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +180 -58
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +32 -14
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +369 -69
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +64 -24
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +86 -30
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +230 -82
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +22 -10
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +8 -8
- package/esm5/cdk.es5.js +4 -4
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +7 -7
- package/esm5/collections.es5.js +42 -19
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +574 -183
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +9 -5
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +86 -33
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +33 -14
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +232 -111
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +20 -13
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +34 -15
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +187 -65
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +32 -14
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +386 -72
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +64 -24
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +87 -31
- package/esm5/tree.es5.js.map +1 -1
- package/layout/typings/breakpoints-observer.d.ts +3 -3
- package/layout/typings/index.metadata.json +1 -1
- package/layout/typings/media-matcher.d.ts +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
- package/package.json +8 -8
- package/portal/typings/portal.d.ts +2 -2
- package/schematics/ng-update/data/attribute-selectors.js +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +3 -3
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +1 -1
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +1 -1
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +4 -4
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +5811 -0
- package/schematics/utils/ast.d.ts +1 -1
- package/schematics/utils/build-component.js +1 -1
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/project-main-file.d.ts +1 -1
- package/schematics/utils/project-style-file.d.ts +1 -1
- package/schematics/utils/project-targets.d.ts +1 -1
- package/schematics/utils/schematic-options.d.ts +1 -1
- package/table/typings/cell.d.ts +3 -2
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/row.d.ts +5 -4
- package/table/typings/sticky-styler.d.ts +5 -5
- package/table/typings/table-errors.d.ts +10 -0
- package/table/typings/text-column.d.ts +80 -0
- package/typings/drag-drop/directives/drag.d.ts +11 -2
- package/typings/drag-drop/drag-events.d.ts +17 -0
- package/typings/drag-drop/drag-ref.d.ts +9 -5
- package/typings/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
- package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
- package/typings/esm5/layout/index.metadata.json +1 -1
- package/typings/esm5/layout/media-matcher.d.ts +2 -2
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/esm5/portal/portal.d.ts +2 -2
- package/typings/esm5/table/cell.d.ts +3 -2
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/row.d.ts +5 -4
- package/typings/esm5/table/sticky-styler.d.ts +5 -5
- package/typings/esm5/table/table-errors.d.ts +10 -0
- package/typings/esm5/table/text-column.d.ts +80 -0
- package/typings/index.metadata.json +1 -1
- package/typings/layout/breakpoints-observer.d.ts +3 -3
- package/typings/layout/index.metadata.json +1 -1
- package/typings/layout/media-matcher.d.ts +2 -2
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/portal/portal.d.ts +2 -2
- package/typings/schematics/utils/ast.d.ts +1 -1
- package/typings/schematics/utils/get-project.d.ts +1 -1
- package/typings/schematics/utils/project-main-file.d.ts +1 -1
- package/typings/schematics/utils/project-style-file.d.ts +1 -1
- package/typings/schematics/utils/project-targets.d.ts +1 -1
- package/typings/schematics/utils/schematic-options.d.ts +1 -1
- package/typings/table/cell.d.ts +3 -2
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/row.d.ts +5 -4
- package/typings/table/sticky-styler.d.ts +5 -5
- package/typings/table/table-errors.d.ts +10 -0
- package/typings/table/text-column.d.ts +80 -0
package/esm5/platform.es5.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { Inject, Injectable, Optional, PLATFORM_ID, NgModule,
|
|
8
|
+
import { Inject, Injectable, Optional, PLATFORM_ID, NgModule, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
|
|
9
9
|
import { isPlatformBrowser } from '@angular/common';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @fileoverview added by tsickle
|
|
13
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
13
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
14
14
|
*/
|
|
15
15
|
// Whether the current platform supports the V8 Break Iterator. The V8 check
|
|
16
16
|
// is necessary to detect all Blink based browsers.
|
|
@@ -20,7 +20,7 @@ var hasV8BreakIterator;
|
|
|
20
20
|
// cause IE to throw. These cases are tied to particular versions of Windows and can happen if
|
|
21
21
|
// the consumer is providing a polyfilled `Map`. See:
|
|
22
22
|
// https://github.com/Microsoft/ChakraCore/issues/3189
|
|
23
|
-
// https://github.com/angular/
|
|
23
|
+
// https://github.com/angular/components/issues/15687
|
|
24
24
|
try {
|
|
25
25
|
hasV8BreakIterator = (typeof Intl !== 'undefined' && ((/** @type {?} */ (Intl))).v8BreakIterator);
|
|
26
26
|
}
|
|
@@ -99,13 +99,13 @@ var Platform = /** @class */ (function () {
|
|
|
99
99
|
Platform.ctorParameters = function () { return [
|
|
100
100
|
{ type: Object, decorators: [{ type: Optional }, { type: Inject, args: [PLATFORM_ID,] }] }
|
|
101
101
|
]; };
|
|
102
|
-
/** @nocollapse */ Platform.ngInjectableDef =
|
|
102
|
+
/** @nocollapse */ Platform.ngInjectableDef = ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(ɵɵinject(PLATFORM_ID, 8)); }, token: Platform, providedIn: "root" });
|
|
103
103
|
return Platform;
|
|
104
104
|
}());
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* @fileoverview added by tsickle
|
|
108
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
108
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
109
109
|
*/
|
|
110
110
|
var PlatformModule = /** @class */ (function () {
|
|
111
111
|
function PlatformModule() {
|
|
@@ -118,7 +118,7 @@ var PlatformModule = /** @class */ (function () {
|
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* @fileoverview added by tsickle
|
|
121
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
121
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
122
122
|
*/
|
|
123
123
|
|
|
124
124
|
/**
|
|
@@ -175,16 +175,20 @@ function getSupportedInputTypes() {
|
|
|
175
175
|
}
|
|
176
176
|
/** @type {?} */
|
|
177
177
|
var featureTestInput = document.createElement('input');
|
|
178
|
-
supportedInputTypes = new Set(candidateInputTypes.filter(
|
|
178
|
+
supportedInputTypes = new Set(candidateInputTypes.filter((/**
|
|
179
|
+
* @param {?} value
|
|
180
|
+
* @return {?}
|
|
181
|
+
*/
|
|
182
|
+
function (value) {
|
|
179
183
|
featureTestInput.setAttribute('type', value);
|
|
180
184
|
return featureTestInput.type === value;
|
|
181
|
-
}));
|
|
185
|
+
})));
|
|
182
186
|
return supportedInputTypes;
|
|
183
187
|
}
|
|
184
188
|
|
|
185
189
|
/**
|
|
186
190
|
* @fileoverview added by tsickle
|
|
187
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
191
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
188
192
|
*/
|
|
189
193
|
|
|
190
194
|
/**
|
|
@@ -201,7 +205,10 @@ function supportsPassiveEventListeners() {
|
|
|
201
205
|
if (supportsPassiveEvents == null && typeof window !== 'undefined') {
|
|
202
206
|
try {
|
|
203
207
|
window.addEventListener('test', (/** @type {?} */ (null)), Object.defineProperty({}, 'passive', {
|
|
204
|
-
get:
|
|
208
|
+
get: (/**
|
|
209
|
+
* @return {?}
|
|
210
|
+
*/
|
|
211
|
+
function () { return supportsPassiveEvents = true; })
|
|
205
212
|
}));
|
|
206
213
|
}
|
|
207
214
|
finally {
|
|
@@ -223,7 +230,7 @@ function normalizePassiveListenerOptions(options) {
|
|
|
223
230
|
|
|
224
231
|
/**
|
|
225
232
|
* @fileoverview added by tsickle
|
|
226
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
233
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
227
234
|
*/
|
|
228
235
|
|
|
229
236
|
/** @enum {number} */
|
|
@@ -310,12 +317,12 @@ function getRtlScrollAxisType() {
|
|
|
310
317
|
|
|
311
318
|
/**
|
|
312
319
|
* @fileoverview added by tsickle
|
|
313
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
320
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
314
321
|
*/
|
|
315
322
|
|
|
316
323
|
/**
|
|
317
324
|
* @fileoverview added by tsickle
|
|
318
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
325
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
319
326
|
*/
|
|
320
327
|
|
|
321
328
|
export { Platform, PlatformModule, getSupportedInputTypes, supportsPassiveEventListeners, normalizePassiveListenerOptions, supportsScrollBehavior, getRtlScrollAxisType, RtlScrollAxisType };
|
package/esm5/platform.es5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.es5.js","sources":["../../../src/cdk/platform/features/scrolling.ts","../../../src/cdk/platform/features/passive-listeners.ts","../../../src/cdk/platform/features/input-types.ts","../../../src/cdk/platform/platform-module.ts","../../../src/cdk/platform/platform.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\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n return !!(typeof document == 'object' && 'scrollBehavior' in document.documentElement!.style);\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (!rtlScrollAxisType) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.height = '1px';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.parentNode!.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\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/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(options: AddEventListenerOptions):\n AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\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/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\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 {NgModule} from '@angular/core';\n\n\n@NgModule({})\nexport class PlatformModule {}\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 {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/material2/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n /**\n * Whether the Angular application is being rendered in the browser.\n * We want to use the Angular platform check because if the Document is shimmed\n * without the navigator, the following checks will fail. This is preferred because\n * sometimes the Document may be shimmed without the user's knowledge or intention\n */\n isBrowser: boolean = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Blink. */\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n /** Whether the current rendering engine is WebKit. */\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n\n /** Whether the current browser is Firefox. */\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n /** Whether the current browser is Safari. */\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n /**\n * @breaking-change 8.0.0 remove optional decorator\n */\n constructor(@Optional() @Inject(PLATFORM_ID) private _platformId?: Object) {\n}\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AIaA,IAAI,kBAA2B,CAA/B;;;;;;AAOA,IAAI;IACF,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,oBAAC,IAAI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C,MAAM,CAAC;;;;QAK7C,IAAI,eAAe,CAAC,UAAU,KAAK,CAAC,EAAE;;;;;YAKpC,eAAe,CAAC,UAAU,GAAG,CAAC,CAAC;YAC/B,iBAAiB;gBACb,eAAe,CAAC,UAAU,KAAK,CAAC,GAAG,iBAAiB,CAAC,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC;SAC/F;QAED,mBAAA,eAAe,CAAC,UAAU,GAAE,WAAW,CAAC,eAAe,CAAC,CAAC;KAC1D;IACD,OAAO,iBAAiB,CAAC;CAC1B;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"platform.es5.js","sources":["../../../src/cdk/platform/features/scrolling.ts","../../../src/cdk/platform/features/passive-listeners.ts","../../../src/cdk/platform/features/input-types.ts","../../../src/cdk/platform/platform-module.ts","../../../src/cdk/platform/platform.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\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n return !!(typeof document == 'object' && 'scrollBehavior' in document.documentElement!.style);\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (!rtlScrollAxisType) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.height = '1px';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.parentNode!.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\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/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(options: AddEventListenerOptions):\n AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\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/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\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 {NgModule} from '@angular/core';\n\n\n@NgModule({})\nexport class PlatformModule {}\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 {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n /**\n * Whether the Angular application is being rendered in the browser.\n * We want to use the Angular platform check because if the Document is shimmed\n * without the navigator, the following checks will fail. This is preferred because\n * sometimes the Document may be shimmed without the user's knowledge or intention\n */\n isBrowser: boolean = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Blink. */\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n /** Whether the current rendering engine is WebKit. */\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n\n /** Whether the current browser is Firefox. */\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n /** Whether the current browser is Safari. */\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n /**\n * @breaking-change 8.0.0 remove optional decorator\n */\n constructor(@Optional() @Inject(PLATFORM_ID) private _platformId?: Object) {\n}\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AIaA,IAAI,kBAA2B,CAA/B;;;;;;AAOA,IAAI;IACF,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,oBAAC,IAAI,IAAS,eAAe,CAAC,CAAC;CACrF;AAAC,OAAF,EAAA,EAAQ;IACN,kBAAkB,GAAG,KAAK,CAAC;CAC5B;;;;;AAMD,AAAA,IAAA,QAAA,kBAAA,YAAA;;;;IAoDE,SAAF,QAAA,CAAuD,WAAoB,EAA3E;QAAuD,IAAvD,CAAA,WAAkE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AAG,iBAAiB,CAAC,QAAQ,CAAC;SAC/F;QAED,mBAAA,eAAe,CAAC,UAAU,GAAE,WAAW,CAAC,eAAe,CAAC,CAAC;KAC1D;IACD,OAAO,iBAAiB,CAAC;CAC1B;;;;;;;;;;;;;;"}
|
package/esm5/portal.es5.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ComponentFactoryResolver, Directive, EventEmitter, NgModule, Output, Te
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @fileoverview added by tsickle
|
|
13
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
13
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -65,7 +65,7 @@ function throwNoPortalAttachedError() {
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* @fileoverview added by tsickle
|
|
68
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
68
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
69
69
|
*/
|
|
70
70
|
/**
|
|
71
71
|
* A `Portal` is something that you want to render somewhere else.
|
|
@@ -366,7 +366,7 @@ BasePortalOutlet = /** @class */ (function () {
|
|
|
366
366
|
|
|
367
367
|
/**
|
|
368
368
|
* @fileoverview added by tsickle
|
|
369
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
369
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
370
370
|
*/
|
|
371
371
|
/**
|
|
372
372
|
* A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
|
|
@@ -417,15 +417,21 @@ DomPortalOutlet = /** @class */ (function (_super) {
|
|
|
417
417
|
// and then manually attach the view to the application.
|
|
418
418
|
if (portal.viewContainerRef) {
|
|
419
419
|
componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector);
|
|
420
|
-
this.setDisposeFn(
|
|
420
|
+
this.setDisposeFn((/**
|
|
421
|
+
* @return {?}
|
|
422
|
+
*/
|
|
423
|
+
function () { return componentRef.destroy(); }));
|
|
421
424
|
}
|
|
422
425
|
else {
|
|
423
426
|
componentRef = componentFactory.create(portal.injector || this._defaultInjector);
|
|
424
427
|
this._appRef.attachView(componentRef.hostView);
|
|
425
|
-
this.setDisposeFn(
|
|
428
|
+
this.setDisposeFn((/**
|
|
429
|
+
* @return {?}
|
|
430
|
+
*/
|
|
431
|
+
function () {
|
|
426
432
|
_this._appRef.detachView(componentRef.hostView);
|
|
427
433
|
componentRef.destroy();
|
|
428
|
-
});
|
|
434
|
+
}));
|
|
429
435
|
}
|
|
430
436
|
// At this point the component has been instantiated, so we move it to the location in the DOM
|
|
431
437
|
// where we want it to be rendered.
|
|
@@ -460,14 +466,21 @@ DomPortalOutlet = /** @class */ (function (_super) {
|
|
|
460
466
|
// But for the DomPortalOutlet the view can be added everywhere in the DOM
|
|
461
467
|
// (e.g Overlay Container) To move the view to the specified host element. We just
|
|
462
468
|
// re-append the existing root nodes.
|
|
463
|
-
viewRef.rootNodes.forEach(
|
|
464
|
-
|
|
469
|
+
viewRef.rootNodes.forEach((/**
|
|
470
|
+
* @param {?} rootNode
|
|
471
|
+
* @return {?}
|
|
472
|
+
*/
|
|
473
|
+
function (rootNode) { return _this.outletElement.appendChild(rootNode); }));
|
|
474
|
+
this.setDisposeFn(((/**
|
|
475
|
+
* @return {?}
|
|
476
|
+
*/
|
|
477
|
+
function () {
|
|
465
478
|
/** @type {?} */
|
|
466
479
|
var index = viewContainer.indexOf(viewRef);
|
|
467
480
|
if (index !== -1) {
|
|
468
481
|
viewContainer.remove(index);
|
|
469
482
|
}
|
|
470
|
-
}));
|
|
483
|
+
})));
|
|
471
484
|
// TODO(jelbourn): Return locals from view.
|
|
472
485
|
return viewRef;
|
|
473
486
|
};
|
|
@@ -509,7 +522,7 @@ DomPortalOutlet = /** @class */ (function (_super) {
|
|
|
509
522
|
|
|
510
523
|
/**
|
|
511
524
|
* @fileoverview added by tsickle
|
|
512
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
525
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
513
526
|
*/
|
|
514
527
|
/**
|
|
515
528
|
* Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
|
|
@@ -654,7 +667,10 @@ var CdkPortalOutlet = /** @class */ (function (_super) {
|
|
|
654
667
|
var componentFactory = resolver.resolveComponentFactory(portal.component);
|
|
655
668
|
/** @type {?} */
|
|
656
669
|
var ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);
|
|
657
|
-
_super.prototype.setDisposeFn.call(this,
|
|
670
|
+
_super.prototype.setDisposeFn.call(this, (/**
|
|
671
|
+
* @return {?}
|
|
672
|
+
*/
|
|
673
|
+
function () { return ref.destroy(); }));
|
|
658
674
|
this._attachedPortal = portal;
|
|
659
675
|
this._attachedRef = ref;
|
|
660
676
|
this.attached.emit(ref);
|
|
@@ -682,7 +698,10 @@ var CdkPortalOutlet = /** @class */ (function (_super) {
|
|
|
682
698
|
portal.setAttachedHost(this);
|
|
683
699
|
/** @type {?} */
|
|
684
700
|
var viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);
|
|
685
|
-
_super.prototype.setDisposeFn.call(this,
|
|
701
|
+
_super.prototype.setDisposeFn.call(this, (/**
|
|
702
|
+
* @return {?}
|
|
703
|
+
*/
|
|
704
|
+
function () { return _this._viewContainerRef.clear(); }));
|
|
686
705
|
this._attachedPortal = portal;
|
|
687
706
|
this._attachedRef = viewRef;
|
|
688
707
|
this.attached.emit(viewRef);
|
|
@@ -719,7 +738,7 @@ var PortalModule = /** @class */ (function () {
|
|
|
719
738
|
|
|
720
739
|
/**
|
|
721
740
|
* @fileoverview added by tsickle
|
|
722
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
741
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
723
742
|
*/
|
|
724
743
|
|
|
725
744
|
/**
|
|
@@ -760,12 +779,12 @@ PortalInjector = /** @class */ (function () {
|
|
|
760
779
|
|
|
761
780
|
/**
|
|
762
781
|
* @fileoverview added by tsickle
|
|
763
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
782
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
764
783
|
*/
|
|
765
784
|
|
|
766
785
|
/**
|
|
767
786
|
* @fileoverview added by tsickle
|
|
768
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
787
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
769
788
|
*/
|
|
770
789
|
|
|
771
790
|
export { DomPortalOutlet as DomPortalHost, CdkPortalOutlet as PortalHostDirective, CdkPortal as TemplatePortalDirective, BasePortalOutlet as BasePortalHost, Portal, ComponentPortal, TemplatePortal, BasePortalOutlet, DomPortalOutlet, CdkPortal, CdkPortalOutlet, PortalModule, PortalInjector };
|
package/esm5/portal.es5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.es5.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<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): 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":["tslib_1.__extends"],"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;IACE,MAAM,KAAK,CAAC,8DAA8D,CAAC,CAAC;CAC7E;;;;;;;;;;;;ADpBD,AAAA,IAAA;;;;;;;IAAA,S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D,CAAA,CAAC;AAtGD,AAyGA,IAAA,YAAA,kBAAA,YAAA;IAAA,SAAA,YAAA,GAAA;KAI4B;;QAJ5B,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;oBACrC,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;iBAC3C,EAAD,EAAA;;IAC2B,OAA3B,YAA4B,CAA5B;CAA4B,EAA5B,CAAA;;;;;;;;;;;;ADtJA,AAAA,IAAA;;;;;;IACE,SAAF,cAAA,CACY,eAAyB,EACzB,aAAgC,EAF5C;QACY,IAAZ,CAAA,eAA2B,GAAf,eAAe,CAAU;QACzB,IAAZ,CAAA,aAAyB,GAAb,aAAa,CAAmB;KAAK;;;;;;IAE/C,cAAF,CAAA,SAAA,CAAA,GAAK;;;;;IAAH,UAAI,KAAU,EAAE,aAAmB,EAArC;;QACA,IAAU,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,CAAH;IACA,OAAA,cAAC,CAAD;CAAC,EAAD,CAAA;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"portal.es5.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":["tslib_1.__extends"],"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;IACE,MAAM,KAAK,CAAC,8DAA8D,CAAC,CAAC;CAC7E;;;;;;;;;;;;ADpBD,AAAA,IAAA;;;;;;;IAAA,SAAA,MAAA,GAAA;KAyCC;;;;;;;IArCC,MAAF,CAAA,SAAA,CAAA,MAAQ;;;;;IAAN,UAAO,IAAkB,EAA3B;QACI,IAAI,IAAI,IAAI,IAAI,EAAE;YA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