@angular/cdk 7.3.3 → 7.3.7

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.
Files changed (119) hide show
  1. package/bundles/cdk-drag-drop.umd.js +1 -1
  2. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  3. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  4. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  5. package/bundles/cdk-overlay.umd.js +8 -3
  6. package/bundles/cdk-overlay.umd.js.map +1 -1
  7. package/bundles/cdk-overlay.umd.min.js +2 -2
  8. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  9. package/bundles/cdk-platform.umd.js +12 -1
  10. package/bundles/cdk-platform.umd.js.map +1 -1
  11. package/bundles/cdk-platform.umd.min.js +1 -1
  12. package/bundles/cdk-platform.umd.min.js.map +1 -1
  13. package/bundles/cdk-scrolling.umd.js +85 -19
  14. package/bundles/cdk-scrolling.umd.js.map +1 -1
  15. package/bundles/cdk-scrolling.umd.min.js +1 -1
  16. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  17. package/bundles/cdk-stepper.umd.js +4 -4
  18. package/bundles/cdk-stepper.umd.js.map +1 -1
  19. package/bundles/cdk-stepper.umd.min.js +1 -1
  20. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  21. package/bundles/cdk-table.umd.js +2 -0
  22. package/bundles/cdk-table.umd.js.map +1 -1
  23. package/bundles/cdk-table.umd.min.js.map +1 -1
  24. package/bundles/cdk-tree.umd.js +127 -51
  25. package/bundles/cdk-tree.umd.js.map +1 -1
  26. package/bundles/cdk-tree.umd.min.js +1 -1
  27. package/bundles/cdk-tree.umd.min.js.map +1 -1
  28. package/bundles/cdk.umd.js +1 -1
  29. package/bundles/cdk.umd.js.map +1 -1
  30. package/bundles/cdk.umd.min.js +1 -1
  31. package/bundles/cdk.umd.min.js.map +1 -1
  32. package/esm2015/cdk.js +1 -1
  33. package/esm2015/cdk.js.map +1 -1
  34. package/esm2015/drag-drop.js +1 -1
  35. package/esm2015/drag-drop.js.map +1 -1
  36. package/esm2015/overlay.js +5 -2
  37. package/esm2015/overlay.js.map +1 -1
  38. package/esm2015/platform.js +12 -1
  39. package/esm2015/platform.js.map +1 -1
  40. package/esm2015/scrolling.js +59 -15
  41. package/esm2015/scrolling.js.map +1 -1
  42. package/esm2015/stepper.js +0 -1
  43. package/esm2015/stepper.js.map +1 -1
  44. package/esm2015/table.js +2 -0
  45. package/esm2015/table.js.map +1 -1
  46. package/esm2015/tree.js +110 -54
  47. package/esm2015/tree.js.map +1 -1
  48. package/esm5/cdk.es5.js +1 -1
  49. package/esm5/cdk.es5.js.map +1 -1
  50. package/esm5/drag-drop.es5.js +1 -1
  51. package/esm5/drag-drop.es5.js.map +1 -1
  52. package/esm5/overlay.es5.js +8 -3
  53. package/esm5/overlay.es5.js.map +1 -1
  54. package/esm5/platform.es5.js +12 -1
  55. package/esm5/platform.es5.js.map +1 -1
  56. package/esm5/scrolling.es5.js +86 -20
  57. package/esm5/scrolling.es5.js.map +1 -1
  58. package/esm5/stepper.es5.js +0 -1
  59. package/esm5/stepper.es5.js.map +1 -1
  60. package/esm5/table.es5.js +2 -0
  61. package/esm5/table.es5.js.map +1 -1
  62. package/esm5/tree.es5.js +128 -53
  63. package/esm5/tree.es5.js.map +1 -1
  64. package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -1
  65. package/package.json +2 -2
  66. package/platform/typings/index.metadata.json +1 -1
  67. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js +11 -13
  68. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +1 -1
  69. package/schematics/utils/ast/ng-module-imports.js +1 -1
  70. package/schematics/utils/ast/ng-module-imports.js.map +1 -1
  71. package/scrolling/typings/index.metadata.json +1 -1
  72. package/scrolling/typings/virtual-for-of.d.ts +8 -2
  73. package/stepper/typings/index.metadata.json +1 -1
  74. package/stepper/typings/stepper.d.ts +59 -3
  75. package/table/typings/index.metadata.json +1 -1
  76. package/table/typings/table.d.ts +2 -0
  77. package/tree/typings/index.metadata.json +1 -1
  78. package/tree/typings/nested-node.d.ts +3 -1
  79. package/tree/typings/outlet.d.ts +9 -2
  80. package/tree/typings/padding.d.ts +3 -1
  81. package/tree/typings/tree.d.ts +2 -0
  82. package/typings/esm5/index.metadata.json +1 -1
  83. package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -1
  84. package/typings/esm5/platform/index.metadata.json +1 -1
  85. package/typings/esm5/scrolling/index.metadata.json +1 -1
  86. package/typings/esm5/scrolling/virtual-for-of.d.ts +8 -2
  87. package/typings/esm5/stepper/index.metadata.json +1 -1
  88. package/typings/esm5/stepper/stepper.d.ts +59 -3
  89. package/typings/esm5/table/index.metadata.json +1 -1
  90. package/typings/esm5/table/table.d.ts +2 -0
  91. package/typings/esm5/tree/index.metadata.json +1 -1
  92. package/typings/esm5/tree/nested-node.d.ts +3 -1
  93. package/typings/esm5/tree/outlet.d.ts +9 -2
  94. package/typings/esm5/tree/padding.d.ts +3 -1
  95. package/typings/esm5/tree/tree.d.ts +2 -0
  96. package/typings/index.metadata.json +1 -1
  97. package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -1
  98. package/typings/platform/index.metadata.json +1 -1
  99. package/typings/scrolling/index.metadata.json +1 -1
  100. package/typings/scrolling/virtual-for-of.d.ts +8 -2
  101. package/typings/stepper/index.metadata.json +1 -1
  102. package/typings/stepper/stepper.d.ts +59 -3
  103. package/typings/table/index.metadata.json +1 -1
  104. package/typings/table/table.d.ts +2 -0
  105. package/typings/tree/index.metadata.json +1 -1
  106. package/typings/tree/nested-node.d.ts +3 -1
  107. package/typings/tree/outlet.d.ts +9 -2
  108. package/typings/tree/padding.d.ts +3 -1
  109. package/typings/tree/tree.d.ts +2 -0
  110. package/schematics/ng-update/data/attribute-selectors.ts +0 -35
  111. package/schematics/ng-update/data/class-names.ts +0 -55
  112. package/schematics/ng-update/data/constructor-checks.ts +0 -22
  113. package/schematics/ng-update/data/css-selectors.ts +0 -30
  114. package/schematics/ng-update/data/element-selectors.ts +0 -21
  115. package/schematics/ng-update/data/index.ts +0 -17
  116. package/schematics/ng-update/data/input-names.ts +0 -118
  117. package/schematics/ng-update/data/method-call-checks.ts +0 -39
  118. package/schematics/ng-update/data/output-names.ts +0 -28
  119. package/schematics/ng-update/data/property-names.ts +0 -164
@@ -15,7 +15,18 @@ import { isPlatformBrowser } from '@angular/common';
15
15
  // Whether the current platform supports the V8 Break Iterator. The V8 check
16
16
  // is necessary to detect all Blink based browsers.
17
17
  /** @type {?} */
18
- var hasV8BreakIterator = (typeof Intl !== 'undefined' && ((/** @type {?} */ (Intl))).v8BreakIterator);
18
+ var hasV8BreakIterator;
19
+ // We need a try/catch around the reference to `Intl`, because accessing it in some cases can
20
+ // cause IE to throw. These cases are tied to particular versions of Windows and can happen if
21
+ // the consumer is providing a polyfilled `Map`. See:
22
+ // https://github.com/Microsoft/ChakraCore/issues/3189
23
+ // https://github.com/angular/material2/issues/15687
24
+ try {
25
+ hasV8BreakIterator = (typeof Intl !== 'undefined' && ((/** @type {?} */ (Intl))).v8BreakIterator);
26
+ }
27
+ catch (_a) {
28
+ hasV8BreakIterator = false;
29
+ }
19
30
  /**
20
31
  * Service to detect the current platform by comparing the userAgent strings and
21
32
  * checking browser-specific global properties.
@@ -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\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":[],"mappings":";;;;;;;;;;;;;;;;;AIcA,IAAM,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,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AAK,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/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,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,GAAX,WAAW,CAAS;;;;;;;QA5CzE,IAAF,CAAA,SAAW,GAA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GAAE,WAAW,CAAC,eAAe,CAAC,CAAC;KAC1D;IACD,OAAO,iBAAiB,CAAC;CAC1B;;;;;;;;;;;;;;"}
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { InjectionToken, Directive, forwardRef, Input, Injectable, NgZone, Optional, SkipSelf, ElementRef, NgModule, IterableDiffers, TemplateRef, ViewContainerRef, ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Output, ViewChild, ViewEncapsulation, defineInjectable, inject } from '@angular/core';
9
9
  import { coerceNumberProperty } from '@angular/cdk/coercion';
10
- import { Subject, fromEvent, of, Observable, animationFrameScheduler, merge } from 'rxjs';
10
+ import { Subject, fromEvent, of, Observable, animationFrameScheduler, asapScheduler, merge } from 'rxjs';
11
11
  import { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise, shareReplay, switchMap } from 'rxjs/operators';
12
12
  import { Platform, getRtlScrollAxisType, RtlScrollAxisType, supportsScrollBehavior, PlatformModule } from '@angular/cdk/platform';
13
13
  import { Directionality, BidiModule } from '@angular/cdk/bidi';
@@ -914,6 +914,13 @@ var CdkScrollable = /** @class */ (function () {
914
914
  function rangesEqual(r1, r2) {
915
915
  return r1.start == r2.start && r1.end == r2.end;
916
916
  }
917
+ /**
918
+ * Scheduler to be used for scroll events. Needs to fall back to
919
+ * something that doesn't rely on requestAnimationFrame on environments
920
+ * that don't support it (e.g. server-side rendering).
921
+ * @type {?}
922
+ */
923
+ var SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;
917
924
  /**
918
925
  * A viewport that virtualizes it's scrolling with the help of `CdkVirtualForOf`.
919
926
  */
@@ -1018,7 +1025,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1018
1025
  // Collect multiple events into one until the next animation frame. This way if
1019
1026
  // there are multiple scroll events in the same frame we only need to recheck
1020
1027
  // our layout once.
1021
- auditTime(0, animationFrameScheduler))
1028
+ auditTime(0, SCROLL_SCHEDULER))
1022
1029
  .subscribe(function () { return _this._scrollStrategy.onContentScrolled(); });
1023
1030
  _this._markChangeDetectionNeeded();
1024
1031
  }); });
@@ -1813,12 +1820,11 @@ var CdkVirtualForOf = /** @class */ (function () {
1813
1820
  if (record.previousIndex == null) { // Item added.
1814
1821
  // Item added.
1815
1822
  /** @type {?} */
1816
- var view = _this._getViewForNewItem();
1817
- _this._viewContainerRef.insert(view, (/** @type {?} */ (currentIndex)));
1823
+ var view = _this._insertViewForNewItem((/** @type {?} */ (currentIndex)));
1818
1824
  view.context.$implicit = record.item;
1819
1825
  }
1820
1826
  else if (currentIndex == null) { // Item removed.
1821
- _this._cacheView((/** @type {?} */ (_this._viewContainerRef.detach((/** @type {?} */ (adjustedPreviousIndex))))));
1827
+ _this._cacheView(_this._detachView((/** @type {?} */ (adjustedPreviousIndex))));
1822
1828
  }
1823
1829
  else { // Item moved.
1824
1830
  // Item moved.
@@ -1878,28 +1884,21 @@ var CdkVirtualForOf = /** @class */ (function () {
1878
1884
  }
1879
1885
  }
1880
1886
  };
1881
- /** Get a view for a new item, either from the cache or by creating a new one. */
1887
+ /** Inserts a view for a new item, either from the cache or by creating a new one. */
1882
1888
  /**
1883
- * Get a view for a new item, either from the cache or by creating a new one.
1889
+ * Inserts a view for a new item, either from the cache or by creating a new one.
1884
1890
  * @private
1891
+ * @param {?} index
1885
1892
  * @return {?}
1886
1893
  */
1887
- CdkVirtualForOf.prototype._getViewForNewItem = /**
1888
- * Get a view for a new item, either from the cache or by creating a new one.
1894
+ CdkVirtualForOf.prototype._insertViewForNewItem = /**
1895
+ * Inserts a view for a new item, either from the cache or by creating a new one.
1889
1896
  * @private
1897
+ * @param {?} index
1890
1898
  * @return {?}
1891
1899
  */
1892
- function () {
1893
- return this._templateCache.pop() || this._viewContainerRef.createEmbeddedView(this._template, {
1894
- $implicit: (/** @type {?} */ (null)),
1895
- cdkVirtualForOf: this._cdkVirtualForOf,
1896
- index: -1,
1897
- count: -1,
1898
- first: false,
1899
- last: false,
1900
- odd: false,
1901
- even: false
1902
- });
1900
+ function (index) {
1901
+ return this._insertViewFromCache(index) || this._createEmbeddedViewAt(index);
1903
1902
  };
1904
1903
  /** Update the computed properties on the `CdkVirtualForOfContext`. */
1905
1904
  /**
@@ -1920,6 +1919,73 @@ var CdkVirtualForOf = /** @class */ (function () {
1920
1919
  context.even = context.index % 2 === 0;
1921
1920
  context.odd = !context.even;
1922
1921
  };
1922
+ /** Creates a new embedded view and moves it to the given index */
1923
+ /**
1924
+ * Creates a new embedded view and moves it to the given index
1925
+ * @private
1926
+ * @param {?} index
1927
+ * @return {?}
1928
+ */
1929
+ CdkVirtualForOf.prototype._createEmbeddedViewAt = /**
1930
+ * Creates a new embedded view and moves it to the given index
1931
+ * @private
1932
+ * @param {?} index
1933
+ * @return {?}
1934
+ */
1935
+ function (index) {
1936
+ /** @type {?} */
1937
+ var view = this._viewContainerRef.createEmbeddedView(this._template, {
1938
+ $implicit: (/** @type {?} */ (null)),
1939
+ cdkVirtualForOf: this._cdkVirtualForOf,
1940
+ index: -1,
1941
+ count: -1,
1942
+ first: false,
1943
+ last: false,
1944
+ odd: false,
1945
+ even: false
1946
+ });
1947
+ if (index < this._viewContainerRef.length) {
1948
+ this._viewContainerRef.move(view, index);
1949
+ }
1950
+ return view;
1951
+ };
1952
+ /** Inserts a recycled view from the cache at the given index. */
1953
+ /**
1954
+ * Inserts a recycled view from the cache at the given index.
1955
+ * @private
1956
+ * @param {?} index
1957
+ * @return {?}
1958
+ */
1959
+ CdkVirtualForOf.prototype._insertViewFromCache = /**
1960
+ * Inserts a recycled view from the cache at the given index.
1961
+ * @private
1962
+ * @param {?} index
1963
+ * @return {?}
1964
+ */
1965
+ function (index) {
1966
+ /** @type {?} */
1967
+ var cachedView = this._templateCache.pop();
1968
+ if (cachedView) {
1969
+ this._viewContainerRef.insert(cachedView, index);
1970
+ }
1971
+ return cachedView || null;
1972
+ };
1973
+ /** Detaches the embedded view at the given index. */
1974
+ /**
1975
+ * Detaches the embedded view at the given index.
1976
+ * @private
1977
+ * @param {?} index
1978
+ * @return {?}
1979
+ */
1980
+ CdkVirtualForOf.prototype._detachView = /**
1981
+ * Detaches the embedded view at the given index.
1982
+ * @private
1983
+ * @param {?} index
1984
+ * @return {?}
1985
+ */
1986
+ function (index) {
1987
+ return (/** @type {?} */ (this._viewContainerRef.detach(index)));
1988
+ };
1923
1989
  CdkVirtualForOf.decorators = [
1924
1990
  { type: Directive, args: [{
1925
1991
  selector: '[cdkVirtualFor][cdkVirtualForOf]',