@angular/cdk 9.1.1 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/focus-monitor/focus-monitor.d.ts +36 -2
- package/a11y/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +241 -19
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +25 -10
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-clipboard.umd.js +1 -1
- package/bundles/cdk-clipboard.umd.js.map +1 -1
- package/bundles/cdk-clipboard.umd.min.js +1 -1
- package/bundles/cdk-clipboard.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +0 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +203 -6
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +17 -10
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +217 -23
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +25 -10
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +210 -12
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +27 -12
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +11 -0
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +6 -6
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +211 -14
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +19 -4
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +242 -14
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +14 -6
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +278 -50
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +29 -7
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +254 -49
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +16 -9
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +257 -54
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +23 -8
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +243 -46
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +20 -5
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +21 -6
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +3 -3
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +212 -15
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +17 -3
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/coercion/array.d.ts +1 -0
- package/esm2015/a11y/focus-monitor/focus-monitor.js +93 -12
- package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm2015/a11y/focus-trap/focus-trap.js +1 -1
- package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
- package/esm2015/a11y/public-api.js +2 -2
- package/esm2015/bidi/directionality.js +1 -1
- package/esm2015/clipboard/pending-copy.js +3 -3
- package/esm2015/coercion/array.js +1 -2
- package/esm2015/drag-drop/drag-drop.js +1 -1
- package/esm2015/drag-drop/drag-ref.js +7 -5
- package/esm2015/drag-drop/drop-list-ref.js +11 -19
- package/esm2015/layout/breakpoints-observer.js +1 -1
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm2015/overlay/position/overlay-position-builder.js +1 -1
- package/esm2015/platform/features/shadow-dom.js +16 -1
- package/esm2015/platform/public-api.js +2 -2
- package/esm2015/scrolling/scroll-dispatcher.js +38 -5
- package/esm2015/scrolling/viewport-ruler.js +44 -5
- package/esm2015/table/cell.js +18 -8
- package/esm2015/table/public-api.js +3 -2
- package/esm2015/table/row.js +24 -8
- package/esm2015/table/table.js +26 -12
- package/esm2015/table/text-column.js +3 -26
- package/esm2015/table/tokens.js +44 -0
- package/esm2015/testing/protractor/protractor-element.js +4 -2
- package/esm2015/testing/protractor/protractor-harness-environment.js +13 -8
- package/esm2015/testing/testbed/testbed-harness-environment.js +16 -10
- package/esm2015/text-field/autosize.js +38 -4
- package/esm2015/version.js +1 -1
- package/esm5/a11y/focus-monitor/focus-monitor.js +39 -13
- package/esm5/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm5/a11y/focus-trap/focus-trap.js +1 -1
- package/esm5/a11y/live-announcer/live-announcer.js +1 -1
- package/esm5/bidi/directionality.js +1 -1
- package/esm5/clipboard/pending-copy.js +2 -2
- package/esm5/coercion/array.js +1 -2
- package/esm5/drag-drop/drag-drop.js +1 -1
- package/esm5/drag-drop/drag-ref.js +7 -5
- package/esm5/drag-drop/drop-list-ref.js +9 -14
- package/esm5/layout/breakpoints-observer.js +1 -1
- package/esm5/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm5/overlay/position/overlay-position-builder.js +1 -1
- package/esm5/platform/features/shadow-dom.js +11 -1
- package/esm5/scrolling/scroll-dispatcher.js +21 -5
- package/esm5/scrolling/viewport-ruler.js +24 -5
- package/esm5/table/cell.js +13 -8
- package/esm5/table/public-api.js +2 -1
- package/esm5/table/row.js +21 -11
- package/esm5/table/table.js +16 -11
- package/esm5/table/text-column.js +3 -4
- package/esm5/table/tokens.js +16 -0
- package/esm5/testing/protractor/protractor-element.js +4 -2
- package/esm5/testing/protractor/protractor-harness-environment.js +17 -11
- package/esm5/testing/testbed/testbed-harness-environment.js +17 -11
- package/esm5/text-field/autosize.js +20 -4
- package/esm5/version.js +1 -1
- package/fesm2015/a11y.js +89 -11
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/clipboard.js +2 -2
- package/fesm2015/clipboard.js.map +1 -1
- package/fesm2015/coercion.js +0 -1
- package/fesm2015/coercion.js.map +1 -1
- package/fesm2015/drag-drop.js +16 -22
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +2 -1
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/platform.js +16 -1
- package/fesm2015/platform.js.map +1 -1
- package/fesm2015/scrolling.js +76 -7
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +98 -49
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/protractor.js +16 -9
- package/fesm2015/testing/protractor.js.map +1 -1
- package/fesm2015/testing/testbed.js +15 -9
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/text-field.js +37 -3
- package/fesm2015/text-field.js.map +1 -1
- package/fesm5/a11y.js +36 -12
- package/fesm5/a11y.js.map +1 -1
- package/fesm5/cdk.js +1 -1
- package/fesm5/cdk.js.map +1 -1
- package/fesm5/clipboard.js +1 -1
- package/fesm5/clipboard.js.map +1 -1
- package/fesm5/coercion.js +0 -1
- package/fesm5/coercion.js.map +1 -1
- package/fesm5/drag-drop.js +14 -17
- package/fesm5/drag-drop.js.map +1 -1
- package/fesm5/overlay.js +2 -1
- package/fesm5/overlay.js.map +1 -1
- package/fesm5/platform.js +11 -1
- package/fesm5/platform.js.map +1 -1
- package/fesm5/scrolling.js +39 -7
- package/fesm5/scrolling.js.map +1 -1
- package/fesm5/table.js +59 -29
- package/fesm5/table.js.map +1 -1
- package/fesm5/testing/protractor.js +20 -12
- package/fesm5/testing/protractor.js.map +1 -1
- package/fesm5/testing/testbed.js +16 -10
- package/fesm5/testing/testbed.js.map +1 -1
- package/fesm5/text-field.js +19 -3
- package/fesm5/text-field.js.map +1 -1
- package/package.json +1 -1
- package/platform/features/shadow-dom.d.ts +2 -0
- package/platform/index.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/upgrade-rules/class-names-rule.js +3 -1
- package/schematics/utils/ast/ng-module-imports.js +3 -2
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scroll-dispatcher.d.ts +9 -1
- package/scrolling/viewport-ruler.d.ts +9 -1
- package/table/cell.d.ts +2 -0
- package/table/index.metadata.json +1 -1
- package/table/public-api.d.ts +1 -0
- package/table/row.d.ts +6 -3
- package/table/table.d.ts +2 -0
- package/table/text-column.d.ts +2 -13
- package/table/tokens.d.ts +25 -0
- package/testing/protractor/protractor-harness-environment.d.ts +10 -3
- package/testing/testbed/testbed-harness-environment.d.ts +12 -4
- package/text-field/autosize.d.ts +9 -1
- package/text-field/index.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/coercion'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/platform'), require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@angular/cdk/scrolling', ['exports', '@angular/cdk/coercion', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/cdk/platform', '@angular/
|
|
4
|
-
(global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.scrolling = {}), global.ng.cdk.coercion, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.cdk.platform, global.ng.
|
|
5
|
-
}(this, (function (exports, coercion, i0, rxjs, operators, i1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/coercion'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/cdk/bidi'), require('@angular/cdk/collections')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@angular/cdk/scrolling', ['exports', '@angular/cdk/coercion', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/cdk/platform', '@angular/common', '@angular/cdk/bidi', '@angular/cdk/collections'], factory) :
|
|
4
|
+
(global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.scrolling = {}), global.ng.cdk.coercion, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.cdk.platform, global.ng.common, global.ng.cdk.bidi, global.ng.cdk.collections));
|
|
5
|
+
}(this, (function (exports, coercion, i0, rxjs, operators, i1, i2, bidi, collections) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
@@ -210,7 +210,9 @@
|
|
|
210
210
|
* Scrollable references emit a scrolled event.
|
|
211
211
|
*/
|
|
212
212
|
var ScrollDispatcher = /** @class */ (function () {
|
|
213
|
-
function ScrollDispatcher(_ngZone, _platform
|
|
213
|
+
function ScrollDispatcher(_ngZone, _platform,
|
|
214
|
+
/** @breaking-change 11.0.0 make document required */
|
|
215
|
+
document) {
|
|
214
216
|
this._ngZone = _ngZone;
|
|
215
217
|
this._platform = _platform;
|
|
216
218
|
/** Subject for notifying that a registered scrollable reference element has been scrolled. */
|
|
@@ -224,6 +226,7 @@
|
|
|
224
226
|
* scroll event subscriptions.
|
|
225
227
|
*/
|
|
226
228
|
this.scrollContainers = new Map();
|
|
229
|
+
this._document = document;
|
|
227
230
|
}
|
|
228
231
|
/**
|
|
229
232
|
* Registers a scrollable instance with the service and listens for its scrolled events. When the
|
|
@@ -312,6 +315,15 @@
|
|
|
312
315
|
});
|
|
313
316
|
return scrollingContainers;
|
|
314
317
|
};
|
|
318
|
+
/** Access injected document if available or fallback to global document reference */
|
|
319
|
+
ScrollDispatcher.prototype._getDocument = function () {
|
|
320
|
+
return this._document || document;
|
|
321
|
+
};
|
|
322
|
+
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
323
|
+
ScrollDispatcher.prototype._getWindow = function () {
|
|
324
|
+
var doc = this._getDocument();
|
|
325
|
+
return doc.defaultView || window;
|
|
326
|
+
};
|
|
315
327
|
/** Returns true if the element is contained within the provided Scrollable. */
|
|
316
328
|
ScrollDispatcher.prototype._scrollableContainsElement = function (scrollable, elementRef) {
|
|
317
329
|
var element = elementRef.nativeElement;
|
|
@@ -329,6 +341,7 @@
|
|
|
329
341
|
ScrollDispatcher.prototype._addGlobalListener = function () {
|
|
330
342
|
var _this = this;
|
|
331
343
|
this._globalSubscription = this._ngZone.runOutsideAngular(function () {
|
|
344
|
+
var window = _this._getWindow();
|
|
332
345
|
return rxjs.fromEvent(window.document, 'scroll').subscribe(function () { return _this._scrolled.next(); });
|
|
333
346
|
});
|
|
334
347
|
};
|
|
@@ -345,9 +358,10 @@
|
|
|
345
358
|
/** @nocollapse */
|
|
346
359
|
ScrollDispatcher.ctorParameters = function () { return [
|
|
347
360
|
{ type: i0.NgZone },
|
|
348
|
-
{ type: i1.Platform }
|
|
361
|
+
{ type: i1.Platform },
|
|
362
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
|
|
349
363
|
]; };
|
|
350
|
-
ScrollDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform)); }, token: ScrollDispatcher, providedIn: "root" });
|
|
364
|
+
ScrollDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i2.DOCUMENT, 8)); }, token: ScrollDispatcher, providedIn: "root" });
|
|
351
365
|
return ScrollDispatcher;
|
|
352
366
|
}());
|
|
353
367
|
|
|
@@ -525,6 +539,203 @@
|
|
|
525
539
|
return CdkScrollable;
|
|
526
540
|
}());
|
|
527
541
|
|
|
542
|
+
/*! *****************************************************************************
|
|
543
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
544
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
545
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
546
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
547
|
+
|
|
548
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
549
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
550
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
551
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
552
|
+
|
|
553
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
554
|
+
and limitations under the License.
|
|
555
|
+
***************************************************************************** */
|
|
556
|
+
/* global Reflect, Promise */
|
|
557
|
+
|
|
558
|
+
var extendStatics = function(d, b) {
|
|
559
|
+
extendStatics = Object.setPrototypeOf ||
|
|
560
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
561
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
562
|
+
return extendStatics(d, b);
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
function __extends(d, b) {
|
|
566
|
+
extendStatics(d, b);
|
|
567
|
+
function __() { this.constructor = d; }
|
|
568
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
var __assign = function() {
|
|
572
|
+
__assign = Object.assign || function __assign(t) {
|
|
573
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
574
|
+
s = arguments[i];
|
|
575
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
576
|
+
}
|
|
577
|
+
return t;
|
|
578
|
+
};
|
|
579
|
+
return __assign.apply(this, arguments);
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
function __rest(s, e) {
|
|
583
|
+
var t = {};
|
|
584
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
585
|
+
t[p] = s[p];
|
|
586
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
587
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
588
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
589
|
+
t[p[i]] = s[p[i]];
|
|
590
|
+
}
|
|
591
|
+
return t;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function __decorate(decorators, target, key, desc) {
|
|
595
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
596
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
597
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
598
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
function __param(paramIndex, decorator) {
|
|
602
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
function __metadata(metadataKey, metadataValue) {
|
|
606
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
610
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
611
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
612
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
613
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
614
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
function __generator(thisArg, body) {
|
|
619
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
620
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
621
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
622
|
+
function step(op) {
|
|
623
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
624
|
+
while (_) try {
|
|
625
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
626
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
627
|
+
switch (op[0]) {
|
|
628
|
+
case 0: case 1: t = op; break;
|
|
629
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
630
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
631
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
632
|
+
default:
|
|
633
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
634
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
635
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
636
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
637
|
+
if (t[2]) _.ops.pop();
|
|
638
|
+
_.trys.pop(); continue;
|
|
639
|
+
}
|
|
640
|
+
op = body.call(thisArg, _);
|
|
641
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
642
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
function __exportStar(m, exports) {
|
|
647
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
function __values(o) {
|
|
651
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
652
|
+
if (m) return m.call(o);
|
|
653
|
+
return {
|
|
654
|
+
next: function () {
|
|
655
|
+
if (o && i >= o.length) o = void 0;
|
|
656
|
+
return { value: o && o[i++], done: !o };
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function __read(o, n) {
|
|
662
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
663
|
+
if (!m) return o;
|
|
664
|
+
var i = m.call(o), r, ar = [], e;
|
|
665
|
+
try {
|
|
666
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
667
|
+
}
|
|
668
|
+
catch (error) { e = { error: error }; }
|
|
669
|
+
finally {
|
|
670
|
+
try {
|
|
671
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
672
|
+
}
|
|
673
|
+
finally { if (e) throw e.error; }
|
|
674
|
+
}
|
|
675
|
+
return ar;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
function __spread() {
|
|
679
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
680
|
+
ar = ar.concat(__read(arguments[i]));
|
|
681
|
+
return ar;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
function __spreadArrays() {
|
|
685
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
686
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
687
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
688
|
+
r[k] = a[j];
|
|
689
|
+
return r;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
function __await(v) {
|
|
693
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
697
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
698
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
699
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
700
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
701
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
702
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
703
|
+
function fulfill(value) { resume("next", value); }
|
|
704
|
+
function reject(value) { resume("throw", value); }
|
|
705
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function __asyncDelegator(o) {
|
|
709
|
+
var i, p;
|
|
710
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
711
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
function __asyncValues(o) {
|
|
715
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
716
|
+
var m = o[Symbol.asyncIterator], i;
|
|
717
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
718
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
719
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
function __makeTemplateObject(cooked, raw) {
|
|
723
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
724
|
+
return cooked;
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
function __importStar(mod) {
|
|
728
|
+
if (mod && mod.__esModule) return mod;
|
|
729
|
+
var result = {};
|
|
730
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
731
|
+
result.default = mod;
|
|
732
|
+
return result;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
function __importDefault(mod) {
|
|
736
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
737
|
+
}
|
|
738
|
+
|
|
528
739
|
/**
|
|
529
740
|
* @license
|
|
530
741
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -539,10 +750,14 @@
|
|
|
539
750
|
* @docs-private
|
|
540
751
|
*/
|
|
541
752
|
var ViewportRuler = /** @class */ (function () {
|
|
542
|
-
function ViewportRuler(_platform, ngZone
|
|
753
|
+
function ViewportRuler(_platform, ngZone,
|
|
754
|
+
/** @breaking-change 11.0.0 make document required */
|
|
755
|
+
document) {
|
|
543
756
|
var _this = this;
|
|
544
757
|
this._platform = _platform;
|
|
758
|
+
this._document = document;
|
|
545
759
|
ngZone.runOutsideAngular(function () {
|
|
760
|
+
var window = _this._getWindow();
|
|
546
761
|
_this._change = _platform.isBrowser ?
|
|
547
762
|
rxjs.merge(rxjs.fromEvent(window, 'resize'), rxjs.fromEvent(window, 'orientationchange')) :
|
|
548
763
|
rxjs.of();
|
|
@@ -601,6 +816,8 @@
|
|
|
601
816
|
// `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of
|
|
602
817
|
// `document.documentElement` works consistently, where the `top` and `left` values will
|
|
603
818
|
// equal negative the scroll position.
|
|
819
|
+
var document = this._getDocument();
|
|
820
|
+
var window = this._getWindow();
|
|
604
821
|
var documentElement = document.documentElement;
|
|
605
822
|
var documentRect = documentElement.getBoundingClientRect();
|
|
606
823
|
var top = -documentRect.top || document.body.scrollTop || window.scrollY ||
|
|
@@ -617,8 +834,18 @@
|
|
|
617
834
|
if (throttleTime === void 0) { throttleTime = DEFAULT_RESIZE_TIME; }
|
|
618
835
|
return throttleTime > 0 ? this._change.pipe(operators.auditTime(throttleTime)) : this._change;
|
|
619
836
|
};
|
|
837
|
+
/** Access injected document if available or fallback to global document reference */
|
|
838
|
+
ViewportRuler.prototype._getDocument = function () {
|
|
839
|
+
return this._document || document;
|
|
840
|
+
};
|
|
841
|
+
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
842
|
+
ViewportRuler.prototype._getWindow = function () {
|
|
843
|
+
var doc = this._getDocument();
|
|
844
|
+
return doc.defaultView || window;
|
|
845
|
+
};
|
|
620
846
|
/** Updates the cached viewport size. */
|
|
621
847
|
ViewportRuler.prototype._updateViewportSize = function () {
|
|
848
|
+
var window = this._getWindow();
|
|
622
849
|
this._viewportSize = this._platform.isBrowser ?
|
|
623
850
|
{ width: window.innerWidth, height: window.innerHeight } :
|
|
624
851
|
{ width: 0, height: 0 };
|
|
@@ -629,9 +856,10 @@
|
|
|
629
856
|
/** @nocollapse */
|
|
630
857
|
ViewportRuler.ctorParameters = function () { return [
|
|
631
858
|
{ type: i1.Platform },
|
|
632
|
-
{ type: i0.NgZone }
|
|
859
|
+
{ type: i0.NgZone },
|
|
860
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
|
|
633
861
|
]; };
|
|
634
|
-
ViewportRuler.ɵprov = i0.ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone)); }, token: ViewportRuler, providedIn: "root" });
|
|
862
|
+
ViewportRuler.ɵprov = i0.ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i2.DOCUMENT, 8)); }, token: ViewportRuler, providedIn: "root" });
|
|
635
863
|
return ViewportRuler;
|
|
636
864
|
}());
|
|
637
865
|
|
|
@@ -654,7 +882,7 @@
|
|
|
654
882
|
var SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? rxjs.animationFrameScheduler : rxjs.asapScheduler;
|
|
655
883
|
/** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */
|
|
656
884
|
var CdkVirtualScrollViewport = /** @class */ (function (_super) {
|
|
657
|
-
|
|
885
|
+
__extends(CdkVirtualScrollViewport, _super);
|
|
658
886
|
function CdkVirtualScrollViewport(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher,
|
|
659
887
|
/**
|
|
660
888
|
* @deprecated `viewportRuler` parameter to become required.
|
|
@@ -966,7 +1194,7 @@
|
|
|
966
1194
|
var runAfterChangeDetection = this._runAfterChangeDetection;
|
|
967
1195
|
this._runAfterChangeDetection = [];
|
|
968
1196
|
try {
|
|
969
|
-
for (var runAfterChangeDetection_1 =
|
|
1197
|
+
for (var runAfterChangeDetection_1 = __values(runAfterChangeDetection), runAfterChangeDetection_1_1 = runAfterChangeDetection_1.next(); !runAfterChangeDetection_1_1.done; runAfterChangeDetection_1_1 = runAfterChangeDetection_1.next()) {
|
|
970
1198
|
var fn = runAfterChangeDetection_1_1.value;
|
|
971
1199
|
fn();
|
|
972
1200
|
}
|
|
@@ -1077,7 +1305,7 @@
|
|
|
1077
1305
|
// new one, passing back a stream of data changes which we run through `switchMap` to give
|
|
1078
1306
|
// us a data stream that emits the latest data from whatever the current `DataSource` is.
|
|
1079
1307
|
operators.switchMap(function (_a) {
|
|
1080
|
-
var _b =
|
|
1308
|
+
var _b = __read(_a, 2), prev = _b[0], cur = _b[1];
|
|
1081
1309
|
return _this._changeDataSource(prev, cur);
|
|
1082
1310
|
}),
|
|
1083
1311
|
// Replay the last emitted data when someone subscribes.
|
|
@@ -1203,7 +1431,7 @@
|
|
|
1203
1431
|
this._destroyed.next();
|
|
1204
1432
|
this._destroyed.complete();
|
|
1205
1433
|
try {
|
|
1206
|
-
for (var _b =
|
|
1434
|
+
for (var _b = __values(this._templateCache), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1207
1435
|
var view = _c.value;
|
|
1208
1436
|
view.destroy();
|
|
1209
1437
|
}
|