@angular/cdk 7.0.4 → 7.2.1
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/LICENSE +1 -1
- package/_a11y.scss +1 -1
- package/a11y/typings/focus-monitor/focus-monitor.d.ts +20 -5
- package/a11y/typings/focus-trap/focus-trap.d.ts +2 -0
- package/a11y/typings/index.metadata.json +1 -1
- package/a11y/typings/live-announcer/live-announcer.d.ts +34 -3
- package/bundles/cdk-a11y.umd.js +477 -216
- 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 +16 -9
- 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 +11 -6
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +25 -9
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +28 -5
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +2177 -915
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -1
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +33 -1
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +29 -22
- 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 +26 -7
- 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 +605 -258
- 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 +50 -28
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +14 -7
- 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 +139 -44
- 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 +103 -19
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +182 -48
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +76 -38
- 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 +71 -34
- 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 +5 -4
- 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/coercion/typings/element.d.ts +13 -0
- package/coercion/typings/index.metadata.json +1 -1
- package/coercion/typings/public-api.d.ts +1 -0
- package/drag-drop/typings/{drag-handle.d.ts → directives/drag-handle.d.ts} +3 -0
- package/drag-drop/typings/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/drag-drop/typings/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/drag-drop/typings/directives/drag.d.ts +109 -0
- package/{typings/drag-drop → drag-drop/typings/directives}/drop-list-group.d.ts +3 -0
- package/drag-drop/typings/directives/drop-list.d.ts +135 -0
- package/drag-drop/typings/drag-drop-registry.d.ts +8 -3
- package/drag-drop/typings/drag-events.d.ts +14 -7
- package/{typings/esm5/drag-drop/drag.d.ts → drag-drop/typings/drag-ref.d.ts} +152 -82
- package/drag-drop/typings/drop-list-container.d.ts +21 -3
- package/drag-drop/typings/{drop-list.d.ts → drop-list-ref.d.ts} +132 -81
- package/drag-drop/typings/index.d.ts +1 -0
- package/drag-drop/typings/index.metadata.json +1 -1
- package/drag-drop/typings/public-api.d.ts +13 -6
- package/esm2015/a11y.js +337 -190
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +16 -11
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +13 -8
- package/esm2015/bidi.js.map +1 -1
- package/esm2015/cdk.js +7 -6
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +25 -8
- package/esm2015/coercion.js.map +1 -1
- package/esm2015/collections.js +22 -7
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +1587 -691
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +31 -4
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +29 -19
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +15 -10
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +393 -232
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +53 -31
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +13 -9
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +102 -45
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +93 -24
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +89 -45
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +54 -37
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +55 -36
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +481 -220
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +18 -11
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +13 -8
- package/esm5/bidi.es5.js.map +1 -1
- package/esm5/cdk.es5.js +7 -6
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +25 -8
- package/esm5/coercion.es5.js.map +1 -1
- package/esm5/collections.es5.js +35 -7
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +2233 -972
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +35 -4
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +31 -24
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +29 -10
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +609 -262
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +52 -30
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +16 -9
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +141 -46
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +106 -24
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +184 -50
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +75 -37
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +74 -37
- package/esm5/tree.es5.js.map +1 -1
- package/keycodes/typings/index.metadata.json +1 -1
- package/keycodes/typings/modifiers.d.ts +14 -0
- package/keycodes/typings/public-api.d.ts +1 -0
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-directives.d.ts +0 -2
- package/package.json +4 -4
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-update/upgrade-data.js +2 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/index.js +3 -2
- package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
- package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
- package/schematics/utils/ast/ng-module-imports.js +25 -13
- package/schematics/utils/ast/ng-module-imports.js.map +1 -1
- package/schematics/utils/get-project.js +2 -1
- package/schematics/utils/get-project.js.map +1 -1
- package/schematics/utils/parse5-element.js +3 -2
- package/schematics/utils/parse5-element.js.map +1 -1
- package/schematics/utils/project-targets.js +2 -1
- package/schematics/utils/project-targets.js.map +1 -1
- package/schematics/utils/version-agnostic-typescript.js +3 -2
- package/schematics/utils/version-agnostic-typescript.js.map +1 -1
- package/scrolling/typings/index.metadata.json +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/public-api.d.ts +1 -0
- package/stepper/typings/step-header.d.ts +15 -0
- package/stepper/typings/stepper.d.ts +11 -1
- package/text-field/typings/autosize.d.ts +6 -0
- package/text-field/typings/index.metadata.json +1 -1
- package/tree/typings/control/base-tree-control.d.ts +1 -1
- package/tree/typings/control/nested-tree-control.d.ts +2 -2
- package/tree/typings/control/tree-control.d.ts +1 -1
- package/tree/typings/nested-node.d.ts +5 -5
- package/typings/a11y/focus-monitor/focus-monitor.d.ts +20 -5
- package/typings/a11y/focus-trap/focus-trap.d.ts +2 -0
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/a11y/live-announcer/live-announcer.d.ts +34 -3
- package/typings/coercion/element.d.ts +13 -0
- package/typings/coercion/index.metadata.json +1 -1
- package/typings/coercion/public-api.d.ts +1 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drag-handle.d.ts +3 -0
- package/typings/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/typings/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/typings/drag-drop/directives/drag.d.ts +109 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/drag-drop/directives/drop-list.d.ts +135 -0
- package/typings/drag-drop/drag-drop-registry.d.ts +8 -3
- package/typings/drag-drop/drag-events.d.ts +14 -7
- package/typings/drag-drop/{drag.d.ts → drag-ref.d.ts} +152 -82
- package/typings/drag-drop/drop-list-container.d.ts +21 -3
- package/typings/{esm5/drag-drop/drop-list.d.ts → drag-drop/drop-list-ref.d.ts} +132 -81
- package/typings/drag-drop/index.d.ts +1 -0
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/drag-drop/public-api.d.ts +13 -6
- package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +20 -5
- package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +2 -0
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +34 -3
- package/typings/esm5/coercion/element.d.ts +13 -0
- package/typings/esm5/coercion/index.metadata.json +1 -1
- package/typings/esm5/coercion/public-api.d.ts +1 -0
- package/typings/{drag-drop → esm5/drag-drop/directives}/drag-handle.d.ts +3 -0
- package/typings/esm5/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/typings/esm5/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/typings/esm5/drag-drop/directives/drag.d.ts +109 -0
- package/{drag-drop/typings → typings/esm5/drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +135 -0
- package/typings/esm5/drag-drop/drag-drop-registry.d.ts +8 -3
- package/typings/esm5/drag-drop/drag-events.d.ts +14 -7
- package/{drag-drop/typings/drag.d.ts → typings/esm5/drag-drop/drag-ref.d.ts} +152 -82
- package/typings/esm5/drag-drop/drop-list-container.d.ts +21 -3
- package/typings/{drag-drop/drop-list.d.ts → esm5/drag-drop/drop-list-ref.d.ts} +132 -81
- package/typings/esm5/drag-drop/index.d.ts +1 -0
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/public-api.d.ts +13 -6
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/keycodes/index.metadata.json +1 -1
- package/typings/esm5/keycodes/modifiers.d.ts +14 -0
- package/typings/esm5/keycodes/public-api.d.ts +1 -0
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-directives.d.ts +0 -2
- package/typings/esm5/scrolling/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/public-api.d.ts +1 -0
- package/typings/esm5/stepper/step-header.d.ts +15 -0
- package/typings/esm5/stepper/stepper.d.ts +11 -1
- package/typings/esm5/text-field/autosize.d.ts +6 -0
- package/typings/esm5/text-field/index.metadata.json +1 -1
- package/typings/esm5/tree/control/base-tree-control.d.ts +1 -1
- package/typings/esm5/tree/control/nested-tree-control.d.ts +2 -2
- package/typings/esm5/tree/control/tree-control.d.ts +1 -1
- package/typings/esm5/tree/nested-node.d.ts +5 -5
- package/typings/index.metadata.json +1 -1
- package/typings/keycodes/index.metadata.json +1 -1
- package/typings/keycodes/modifiers.d.ts +14 -0
- package/typings/keycodes/public-api.d.ts +1 -0
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-directives.d.ts +0 -2
- package/typings/schematics/utils/ast/ng-module-imports.d.ts +1 -1
- package/typings/scrolling/index.metadata.json +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/public-api.d.ts +1 -0
- package/typings/stepper/step-header.d.ts +15 -0
- package/typings/stepper/stepper.d.ts +11 -1
- package/typings/text-field/autosize.d.ts +6 -0
- package/typings/text-field/index.metadata.json +1 -1
- package/typings/tree/control/base-tree-control.d.ts +1 -1
- package/typings/tree/control/nested-tree-control.d.ts +2 -2
- package/typings/tree/control/tree-control.d.ts +1 -1
- package/typings/tree/nested-node.d.ts +5 -5
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @fileoverview added by tsickle
|
|
16
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
16
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
17
17
|
*/
|
|
18
|
+
// Whether the current platform supports the V8 Break Iterator. The V8 check
|
|
19
|
+
// is necessary to detect all Blink based browsers.
|
|
18
20
|
/** @type {?} */
|
|
19
|
-
var hasV8BreakIterator = (typeof Intl !== 'undefined' && (/** @type {?} */ (Intl)).v8BreakIterator);
|
|
21
|
+
var hasV8BreakIterator = (typeof Intl !== 'undefined' && ((/** @type {?} */ (Intl))).v8BreakIterator);
|
|
20
22
|
/**
|
|
21
23
|
* Service to detect the current platform by comparing the userAgent strings and
|
|
22
24
|
* checking browser-specific global properties.
|
|
@@ -46,11 +48,14 @@ var Platform = /** @class */ (function () {
|
|
|
46
48
|
/**
|
|
47
49
|
* Whether the current rendering engine is Blink.
|
|
48
50
|
*/
|
|
49
|
-
|
|
51
|
+
// EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.
|
|
52
|
+
this.BLINK = this.isBrowser && (!!(((/** @type {?} */ (window))).chrome || hasV8BreakIterator) &&
|
|
50
53
|
typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);
|
|
51
54
|
/**
|
|
52
55
|
* Whether the current rendering engine is WebKit.
|
|
53
56
|
*/
|
|
57
|
+
// Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to
|
|
58
|
+
// ensure that Webkit runs standalone and is not used as another engine's base.
|
|
54
59
|
this.WEBKIT = this.isBrowser &&
|
|
55
60
|
/AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
|
|
56
61
|
/**
|
|
@@ -61,14 +66,22 @@ var Platform = /** @class */ (function () {
|
|
|
61
66
|
/**
|
|
62
67
|
* Whether the current browser is Firefox.
|
|
63
68
|
*/
|
|
69
|
+
// It's difficult to detect the plain Gecko engine, because most of the browsers identify
|
|
70
|
+
// them self as Gecko-like browsers and modify the userAgent's according to that.
|
|
71
|
+
// Since we only cover one explicit Firefox case, we can simply check for Firefox
|
|
72
|
+
// instead of having an unstable check for Gecko.
|
|
64
73
|
this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);
|
|
65
74
|
/**
|
|
66
75
|
* Whether the current platform is Android.
|
|
67
76
|
*/
|
|
77
|
+
// Trident on mobile adds the android platform to the userAgent to trick detections.
|
|
68
78
|
this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;
|
|
69
79
|
/**
|
|
70
80
|
* Whether the current browser is Safari.
|
|
71
81
|
*/
|
|
82
|
+
// Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
|
|
83
|
+
// this and just place the Safari keyword in the userAgent. To be more safe about Safari every
|
|
84
|
+
// Safari browser should also use Webkit as its layout engine.
|
|
72
85
|
this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
|
|
73
86
|
}
|
|
74
87
|
Platform.decorators = [
|
|
@@ -84,7 +97,7 @@ var Platform = /** @class */ (function () {
|
|
|
84
97
|
|
|
85
98
|
/**
|
|
86
99
|
* @fileoverview added by tsickle
|
|
87
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
100
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
88
101
|
*/
|
|
89
102
|
var PlatformModule = /** @class */ (function () {
|
|
90
103
|
function PlatformModule() {
|
|
@@ -97,17 +110,23 @@ var PlatformModule = /** @class */ (function () {
|
|
|
97
110
|
|
|
98
111
|
/**
|
|
99
112
|
* @fileoverview added by tsickle
|
|
100
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
113
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
101
114
|
*/
|
|
102
115
|
|
|
103
|
-
/**
|
|
116
|
+
/**
|
|
104
117
|
* Cached result Set of input types support by the current browser.
|
|
105
|
-
|
|
118
|
+
* @type {?}
|
|
119
|
+
*/
|
|
106
120
|
var supportedInputTypes;
|
|
107
|
-
/**
|
|
121
|
+
/**
|
|
108
122
|
* Types of `<input>` that *might* be supported.
|
|
109
|
-
|
|
123
|
+
* @type {?}
|
|
124
|
+
*/
|
|
110
125
|
var candidateInputTypes = [
|
|
126
|
+
// `color` must come first. Chrome 56 shows a warning if we change the type to `color` after
|
|
127
|
+
// first changing it to something else:
|
|
128
|
+
// The specified value "" does not conform to the required format.
|
|
129
|
+
// The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
|
|
111
130
|
'color',
|
|
112
131
|
'button',
|
|
113
132
|
'checkbox',
|
|
@@ -157,12 +176,13 @@ function getSupportedInputTypes() {
|
|
|
157
176
|
|
|
158
177
|
/**
|
|
159
178
|
* @fileoverview added by tsickle
|
|
160
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
179
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
161
180
|
*/
|
|
162
181
|
|
|
163
|
-
/**
|
|
182
|
+
/**
|
|
164
183
|
* Cached result of whether the user's browser supports passive event listeners.
|
|
165
|
-
|
|
184
|
+
* @type {?}
|
|
185
|
+
*/
|
|
166
186
|
var supportsPassiveEvents;
|
|
167
187
|
/**
|
|
168
188
|
* Checks whether the user's browser supports passive event listeners.
|
|
@@ -172,7 +192,7 @@ var supportsPassiveEvents;
|
|
|
172
192
|
function supportsPassiveEventListeners() {
|
|
173
193
|
if (supportsPassiveEvents == null && typeof window !== 'undefined') {
|
|
174
194
|
try {
|
|
175
|
-
window.addEventListener('test', /** @type {?} */ (
|
|
195
|
+
window.addEventListener('test', (/** @type {?} */ (null)), Object.defineProperty({}, 'passive', {
|
|
176
196
|
get: function () { return supportsPassiveEvents = true; }
|
|
177
197
|
}));
|
|
178
198
|
}
|
|
@@ -195,40 +215,41 @@ function normalizePassiveListenerOptions(options) {
|
|
|
195
215
|
|
|
196
216
|
/**
|
|
197
217
|
* @fileoverview added by tsickle
|
|
198
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
218
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
199
219
|
*/
|
|
200
220
|
|
|
201
221
|
/** @enum {number} */
|
|
202
222
|
var RtlScrollAxisType = {
|
|
203
223
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
224
|
+
* scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled
|
|
225
|
+
* all the way right.
|
|
226
|
+
*/
|
|
207
227
|
NORMAL: 0,
|
|
208
228
|
/**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
229
|
+
* scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled
|
|
230
|
+
* all the way right.
|
|
231
|
+
*/
|
|
212
232
|
NEGATED: 1,
|
|
213
233
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
234
|
+
* scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled
|
|
235
|
+
* all the way right.
|
|
236
|
+
*/
|
|
217
237
|
INVERTED: 2,
|
|
218
238
|
};
|
|
219
239
|
RtlScrollAxisType[RtlScrollAxisType.NORMAL] = 'NORMAL';
|
|
220
240
|
RtlScrollAxisType[RtlScrollAxisType.NEGATED] = 'NEGATED';
|
|
221
241
|
RtlScrollAxisType[RtlScrollAxisType.INVERTED] = 'INVERTED';
|
|
222
|
-
/**
|
|
242
|
+
/**
|
|
223
243
|
* Cached result of the way the browser handles the horizontal scroll axis in RTL mode.
|
|
224
|
-
|
|
244
|
+
* @type {?}
|
|
245
|
+
*/
|
|
225
246
|
var rtlScrollAxisType;
|
|
226
247
|
/**
|
|
227
248
|
* Check whether the browser supports scroll behaviors.
|
|
228
249
|
* @return {?}
|
|
229
250
|
*/
|
|
230
251
|
function supportsScrollBehavior() {
|
|
231
|
-
return !!(typeof document == 'object' && 'scrollBehavior' in /** @type {?} */ (
|
|
252
|
+
return !!(typeof document == 'object' && 'scrollBehavior' in (/** @type {?} */ (document.documentElement)).style);
|
|
232
253
|
}
|
|
233
254
|
/**
|
|
234
255
|
* Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,
|
|
@@ -241,6 +262,7 @@ function getRtlScrollAxisType() {
|
|
|
241
262
|
return RtlScrollAxisType.NORMAL;
|
|
242
263
|
}
|
|
243
264
|
if (!rtlScrollAxisType) {
|
|
265
|
+
// Create a 1px wide scrolling container and a 2px wide content element.
|
|
244
266
|
/** @type {?} */
|
|
245
267
|
var scrollContainer = document.createElement('div');
|
|
246
268
|
/** @type {?} */
|
|
@@ -272,8 +294,8 @@ function getRtlScrollAxisType() {
|
|
|
272
294
|
scrollContainer.scrollLeft = 1;
|
|
273
295
|
rtlScrollAxisType =
|
|
274
296
|
scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;
|
|
275
|
-
}
|
|
276
|
-
((scrollContainer.parentNode)).removeChild(scrollContainer);
|
|
297
|
+
}
|
|
298
|
+
(/** @type {?} */ (scrollContainer.parentNode)).removeChild(scrollContainer);
|
|
277
299
|
}
|
|
278
300
|
return rtlScrollAxisType;
|
|
279
301
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-platform.umd.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\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\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":["NgModule","Optional","Inject","PLATFORM_ID","Injectable","isPlatformBrowser"],"mappings":";;;;;;;;;;;;;;;;;;AIcA,IAAM,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,mBAAC,IAAW,GAAE,eAAe,CAAC,CAAC;;;;;;;;;IA0DxF,SAAF,QAAA,CAAuD,WAAoB,EAA3E;QAAuD,IAAvD,CAAA,WAAkE,GAAX,WAAW,CAAS;;;;;;;QA5CzE,IAAF,CAAA,SAAA,GAAuB,IAAI,CAAC,WAAW;YACjCK,wBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC;;;;QAGrF,IAAF,CAAA,IAAA,GAAkB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;;;;QAGtE,IAAF,CAAA,OAAA,GAAqB,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;;;;QAIjF,IAAF,CAAA,KAAA,GAAmB,IAAI,CAAC,SAAS,KAAK,CAAC,EAAE,mBAAC,MAAa,GAAE,MAAM,IAAI,kBAAkB,CAAC;YAChF,OAAO,GAAG,KAAK,WAAW,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;;;;QAK/D,IAAF,CAAA,MAAA,GAAoB,IAAI,CAAC,SAAS;YAC5B,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,I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QAC9C,IAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;QACnC,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3B,YAAY,CAAC,MAAM,GAAG,KAAK,CAAC;QAE5B,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAE3C,iBAAiB,GAAG,iBAAiB,CAAC,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;QAEL,EAAI,eAAe,CAAC,UAAU,GAAE,WAAW,CAAC,eAAe,CAA3D,CAAA;KACG;IACD,OAAO,iBAAiB,CAAC;CAC1B;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"cdk-platform.umd.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\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\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":["NgModule","Optional","Inject","PLATFORM_ID","Injectable","isPlatformBrowser"],"mappings":";;;;;;;;;;;;;;;;;;;;AIcA,IAAM,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,oBAAC,IAAI,IAAS,eAAe,CAAC,CAAzF;;;;;AAMA,AAAA,IAAA,QAAA,kBAAA,YAAA;;;;IAoDE,SAAF,QAAA,CAAuD,WAAoB,EAA3E;QAAuD,IAAvD,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AAiB,CAAC,QAAQ,CAAC;SAC/F;QAED,mBAAA,eAAe,CAAC,UAAU,GAAE,WAAW,CAAC,eAAe,CAAC,CAAC;KAC1D;IACD,OAAO,iBAAiB,CAAC;CAC1B;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-platform.umd.min.js","sources":["../../src/cdk/platform/features/input-types.ts","../../src/cdk/platform/features/passive-listeners.ts","../../src/cdk/platform/features/scrolling.ts","../../src/cdk/platform/platform.ts","../../src/cdk/platform/platform-module.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/** 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\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/** 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\nimport {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\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","/**\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"],"names":["getSupportedInputTypes","supportedInputTypes","document","Set","candidateInputTypes","featureTestInput","createElement","filter","value","setAttribute","type","supportsPassiveEventListeners","supportsPassiveEvents","window","addEventListener","Object","defineProperty","get","normalizePassiveListenerOptions","options","capture","supportsScrollBehavior","style","getRtlScrollAxisType","RtlScrollAxisType","NORMAL","rtlScrollAxisType","scrollContainer","containerStyle","dir","height","width","overflow","visibility","pointerEvents","position","content","contentStyle","appendChild","body","scrollLeft","NEGATED","INVERTED","removeChild","hasV8BreakIterator","Intl","v8BreakIterator","Platform","_platformId","this","isBrowser","isPlatformBrowser","EDGE","test","navigator","userAgent","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","Injectable","args","providedIn","decorators","Optional","Inject","PLATFORM_ID","NgModule","PlatformModule"],"mappings":";;;;;;;+WA0CA,SAAgBA,KAEd,GAAIC,EACF,MAAOA,EAMT,IAAwB,gBAAbC,YAA0BA,SAEnC,MADAD,GAAsB,GAAIE,KAAIC,EAIhC,IAAIC,GAAmBH,SAASI,cAAc,QAM9C,OALAL,GAAsB,GAAIE,KAAIC,EAAoBG,OAAO,SAAAC,GAEvD,MADAH,GAAiB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AAa,UAAUG,KAAKC,UAAUC,WAG3DN,KAAFO,QAAqBP,KAAKC,WAAa,kBAAkBG,KAAKC,UAAUC,WAItEN,KAAFQ,MAAmBR,KAAKC,cAAiB,OAAgBQ,SAAUd,IAC9C,mBAARe,OAAwBV,KAAKG,OAASH,KAAKO,QAKtDP,KAAFW,OAAoBX,KAAKC,WACnB,eAAeG,KAAKC,UAAUC,aAAeN,KAAKQ,QAAUR,KAAKG,OAASH,KAAKO,QAGnFP,KAAFY,IAAiBZ,KAAKC,WAAa,mBAAmBG,KAAKC,UAAUC,cAC7D,YAAc1C,SAOpBoC,KAAFa,QAAqBb,KAAKC,WAAa,uBAAuBG,KAAKC,UAAUC,WAI3EN,KAAFc,QAAqBd,KAAKC,WAAa,WAAWG,KAAKC,UAAUC,aAAeN,KAAKO,QAMnFP,KAAFe,OAAoBf,KAAKC,WAAa,UAAUG,KAAKC,UAAUC,YAAcN,KAAKW,OAnElF,sBAoBAlD,KAACuD,EAAAA,WAADC,OAAaC,WAAY,+CAoDzBzD,KAAqEK,OAArEqD,aAAA1D,KAAe2D,EAAAA,WAAf3D,KAA2B4D,EAAAA,OAA3BJ,MAAkCK,EAAAA,gJAxElCxB,gCCAA,sBAWArC,KAAC8D,EAAAA,SAADN,YAXAO,KJYMrE,GAKJ,QACA,SACA,WACA,OACA,iBACA,QACA,OACA,SACA,QACA,QACA,SACA,WACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,OACA,MACA,WExBAqB,OAAF,EAKEgB,QAAF,EAKEC,SAAF,EAVAlB,GAAAA,EAAEC,QAAF,SAKAD,EAAAA,EAAEiB,SAAF,UAKAjB,EAAAA,EAAEkB,UAAF,UAIA,IAAIhB"}
|
|
1
|
+
{"version":3,"file":"cdk-platform.umd.min.js","sources":["../../src/cdk/platform/features/input-types.ts","../../src/cdk/platform/features/passive-listeners.ts","../../src/cdk/platform/features/scrolling.ts","../../src/cdk/platform/platform.ts","../../src/cdk/platform/platform-module.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/** 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\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/** 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\nimport {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\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","/**\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"],"names":["getSupportedInputTypes","supportedInputTypes","document","Set","candidateInputTypes","featureTestInput","createElement","filter","value","setAttribute","type","supportsPassiveEventListeners","supportsPassiveEvents","window","addEventListener","Object","defineProperty","get","normalizePassiveListenerOptions","options","capture","supportsScrollBehavior","style","getRtlScrollAxisType","RtlScrollAxisType","NORMAL","rtlScrollAxisType","scrollContainer","containerStyle","dir","height","width","overflow","visibility","pointerEvents","position","content","contentStyle","appendChild","body","scrollLeft","NEGATED","INVERTED","removeChild","hasV8BreakIterator","Intl","v8BreakIterator","Platform","_platformId","this","isBrowser","isPlatformBrowser","EDGE","test","navigator","userAgent","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","Injectable","args","providedIn","decorators","Optional","Inject","PLATFORM_ID","PlatformModule","NgModule"],"mappings":";;;;;;;+WA0CA,SAAgBA,KAEd,GAAIC,EACF,MAAOA,EAMT,IAAwB,gBAAbC,YAA0BA,SAEnC,MADAD,GAAsB,GAAIE,KAAIC,EAIlC,IAAMC,GAAmBH,SAASI,cAAc,QAM9C,OALAL,GAAsB,GAAIE,KAAIC,EAAoBG,OAAO,SAAAC,GAEvD,MADAH,GAAiBI,aAAa,OAAQD,GAC/BH,EAAiBK,OAASF,KC5CrC,QAAgBG,KACd,GAA6B,MAAzBC,GAAmD,mBAAXC,QAC1C,IACEA,OAAOC,iBAAiB,OAAM,KAASC,OAAOC,kBAAmB,WAC/DC,IAAK,WAAM,MAAAL,IAAwB,cAGrCA,EAAwBA,IAAyB,EAIrD,MAAOA,GAST,QAAgBM,GAAgCC,GAE9C,MAAOR,KAAkCQ,IAAYA,EAAQC,QCN/D,QAAgBC,KACd,SAA6B,gBAAZnB,WAAyB,kBAAoBA,UAAwB,gBAAEoB,OAO1F,QAAgB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AC7D,YAAc1C,SAOpBoC,KAAFa,QAAqBb,KAAKC,WAAa,uBAAuBG,KAAKC,UAAUC,WAI3EN,KAAFc,QAAqBd,KAAKC,WAAa,WAAWG,KAAKC,UAAUC,aAAeN,KAAKO,QAMnFP,KAAFe,OAAoBf,KAAKC,WAAa,UAAUG,KAAKC,UAAUC,YAAcN,KAAKW,OAnElF,sBAoBAlD,KAACuD,EAAAA,WAADC,OAAaC,WAAY,+CAoDzBzD,KAAqEK,OAArEqD,aAAA1D,KAAe2D,EAAAA,WAAf3D,KAA2B4D,EAAAA,OAA3BJ,MAAkCK,EAAAA,gJAxElCxB,KCWAyB,EAAA,WAAA,QAAAA,MAC6B,sBAD7B9D,KAAC+D,EAAAA,SAADP,YACAM,KJAMpE,GAKJ,QACA,SACA,WACA,OACA,iBACA,QACA,OACA,SACA,QACA,QACA,SACA,WACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,OACA,MACA,WExBAqB,OAAF,EAKEgB,QAAF,EAKEC,SAAF,uEAIA,IAAIhB"}
|
|
@@ -42,7 +42,7 @@ function __extends(d, b) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @fileoverview added by tsickle
|
|
45
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
45
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -97,7 +97,7 @@ function throwNoPortalAttachedError() {
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* @fileoverview added by tsickle
|
|
100
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
100
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
101
101
|
*/
|
|
102
102
|
/**
|
|
103
103
|
* A `Portal` is something that you want to render somewhere else.
|
|
@@ -133,7 +133,7 @@ Portal = /** @class */ (function () {
|
|
|
133
133
|
throwPortalAlreadyAttachedError();
|
|
134
134
|
}
|
|
135
135
|
this._attachedHost = host;
|
|
136
|
-
return /** @type {?} */ (host.attach(this));
|
|
136
|
+
return (/** @type {?} */ (host.attach(this)));
|
|
137
137
|
};
|
|
138
138
|
/** Detach this portal from its host */
|
|
139
139
|
/**
|
|
@@ -380,9 +380,11 @@ BasePortalOutlet = /** @class */ (function () {
|
|
|
380
380
|
this._disposeFn = fn;
|
|
381
381
|
};
|
|
382
382
|
/**
|
|
383
|
+
* @private
|
|
383
384
|
* @return {?}
|
|
384
385
|
*/
|
|
385
386
|
BasePortalOutlet.prototype._invokeDisposeFn = /**
|
|
387
|
+
* @private
|
|
386
388
|
* @return {?}
|
|
387
389
|
*/
|
|
388
390
|
function () {
|
|
@@ -396,7 +398,7 @@ BasePortalOutlet = /** @class */ (function () {
|
|
|
396
398
|
|
|
397
399
|
/**
|
|
398
400
|
* @fileoverview added by tsickle
|
|
399
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
401
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
400
402
|
*/
|
|
401
403
|
/**
|
|
402
404
|
* A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
|
|
@@ -518,25 +520,28 @@ DomPortalOutlet = /** @class */ (function (_super) {
|
|
|
518
520
|
this.outletElement.parentNode.removeChild(this.outletElement);
|
|
519
521
|
}
|
|
520
522
|
};
|
|
523
|
+
/** Gets the root HTMLElement for an instantiated component. */
|
|
521
524
|
/**
|
|
522
525
|
* Gets the root HTMLElement for an instantiated component.
|
|
526
|
+
* @private
|
|
523
527
|
* @param {?} componentRef
|
|
524
528
|
* @return {?}
|
|
525
529
|
*/
|
|
526
530
|
DomPortalOutlet.prototype._getComponentRootNode = /**
|
|
527
531
|
* Gets the root HTMLElement for an instantiated component.
|
|
532
|
+
* @private
|
|
528
533
|
* @param {?} componentRef
|
|
529
534
|
* @return {?}
|
|
530
535
|
*/
|
|
531
536
|
function (componentRef) {
|
|
532
|
-
return /** @type {?} */ ((/** @type {?} */ (componentRef.hostView)).rootNodes[0]);
|
|
537
|
+
return (/** @type {?} */ (((/** @type {?} */ (componentRef.hostView))).rootNodes[0]));
|
|
533
538
|
};
|
|
534
539
|
return DomPortalOutlet;
|
|
535
540
|
}(BasePortalOutlet));
|
|
536
541
|
|
|
537
542
|
/**
|
|
538
543
|
* @fileoverview added by tsickle
|
|
539
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
544
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
540
545
|
*/
|
|
541
546
|
/**
|
|
542
547
|
* Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
|
|
@@ -669,6 +674,8 @@ var CdkPortalOutlet = /** @class */ (function (_super) {
|
|
|
669
674
|
*/
|
|
670
675
|
function (portal) {
|
|
671
676
|
portal.setAttachedHost(this);
|
|
677
|
+
// If the portal specifies an origin, use that as the logical location of the component
|
|
678
|
+
// in the application tree. Otherwise use the location of this PortalOutlet.
|
|
672
679
|
/** @type {?} */
|
|
673
680
|
var viewContainerRef = portal.viewContainerRef != null ?
|
|
674
681
|
portal.viewContainerRef :
|
|
@@ -744,7 +751,7 @@ var PortalModule = /** @class */ (function () {
|
|
|
744
751
|
|
|
745
752
|
/**
|
|
746
753
|
* @fileoverview added by tsickle
|
|
747
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
754
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
748
755
|
*/
|
|
749
756
|
|
|
750
757
|
/**
|