@angular/cdk 10.0.2 → 10.1.3
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/aria-describer/aria-describer.d.ts +10 -1
- package/a11y/index.metadata.json +1 -1
- package/a11y/interactivity-checker/interactivity-checker.d.ts +11 -1
- package/a11y/key-manager/list-key-manager.d.ts +6 -0
- package/accordion/accordion.d.ts +7 -1
- package/accordion/index.d.ts +1 -0
- package/accordion/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +514 -410
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +35 -11
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +47 -39
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js +10 -2
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +25 -25
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.min.js +5 -4
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-clipboard.umd.js +37 -36
- package/bundles/cdk-clipboard.umd.js.map +1 -1
- package/bundles/cdk-clipboard.umd.min.js +10 -2
- package/bundles/cdk-clipboard.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.js +303 -237
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +3 -9
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +1059 -927
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +72 -10
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.js +18 -18
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +6 -5
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +34 -34
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +2 -2
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +638 -416
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +51 -12
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +10 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +4 -11
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +355 -300
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +4 -5
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +482 -392
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +20 -12
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +117 -117
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +11 -2
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +862 -607
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +8 -15
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +300 -241
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +2 -9
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +337 -276
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +7 -30
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +358 -270
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +3 -18
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +51 -51
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +10 -2
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +449 -396
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +28 -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/drag-drop/clone-node.d.ts +9 -0
- package/drag-drop/directives/drag-handle.d.ts +8 -2
- package/drag-drop/directives/drag-placeholder.d.ts +7 -1
- package/drag-drop/directives/drag-preview.d.ts +7 -1
- package/drag-drop/directives/drag.d.ts +3 -7
- package/drag-drop/directives/drop-list-group.d.ts +7 -1
- package/drag-drop/directives/drop-list.d.ts +7 -1
- package/drag-drop/index.d.ts +2 -2
- package/drag-drop/index.metadata.json +1 -1
- package/drag-drop/parent-position-tracker.d.ts +1 -1
- package/esm2015/a11y/aria-describer/aria-describer.js +21 -7
- 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/interactivity-checker/interactivity-checker.js +43 -30
- package/esm2015/a11y/key-manager/list-key-manager.js +27 -2
- package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
- package/esm2015/accordion/accordion-item.js +7 -7
- package/esm2015/accordion/accordion.js +9 -2
- package/esm2015/accordion/index.js +2 -1
- package/esm2015/clipboard/pending-copy.js +7 -6
- package/esm2015/drag-drop/clone-node.js +54 -0
- package/esm2015/drag-drop/directives/drag-handle.js +12 -5
- package/esm2015/drag-drop/directives/drag-placeholder.js +10 -3
- package/esm2015/drag-drop/directives/drag-preview.js +10 -3
- package/esm2015/drag-drop/directives/drag.js +19 -15
- package/esm2015/drag-drop/directives/drop-list-group.js +9 -2
- package/esm2015/drag-drop/directives/drop-list.js +19 -8
- package/esm2015/drag-drop/drag-ref.js +2 -29
- package/esm2015/drag-drop/index.js +3 -2
- package/esm2015/layout/breakpoints-observer.js +1 -1
- package/esm2015/overlay/dispatchers/base-overlay-dispatcher.js +51 -0
- package/esm2015/overlay/dispatchers/index.js +10 -0
- package/esm2015/overlay/dispatchers/overlay-keyboard-dispatcher.js +79 -0
- package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +94 -0
- package/esm2015/overlay/index.js +5 -4
- package/esm2015/overlay/overlay-config.js +5 -1
- package/esm2015/overlay/overlay-directives.js +34 -8
- package/esm2015/overlay/overlay-module.js +2 -2
- package/esm2015/overlay/overlay-ref.js +24 -2
- package/esm2015/overlay/overlay-reference.js +1 -1
- package/esm2015/overlay/overlay.js +10 -5
- package/esm2015/overlay/position/connected-position-strategy.js +1 -5
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -3
- package/esm2015/overlay/position/overlay-position-builder.js +1 -1
- package/esm2015/overlay/public-api.js +2 -2
- package/esm2015/portal/dom-portal-outlet.js +5 -2
- package/esm2015/scrolling/public-api.js +2 -1
- package/esm2015/scrolling/scrolling-module.js +4 -1
- package/esm2015/scrolling/viewport-ruler.js +24 -10
- package/esm2015/scrolling/virtual-for-of.js +26 -12
- package/esm2015/scrolling/virtual-scroll-repeater.js +8 -0
- package/esm2015/scrolling/virtual-scroll-viewport.js +2 -2
- package/esm2015/table/cell.js +18 -3
- package/esm2015/table/coalesced-style-scheduler.js +87 -0
- package/esm2015/table/public-api.js +2 -1
- package/esm2015/table/sticky-styler.js +79 -45
- package/esm2015/table/table.js +33 -12
- package/esm2015/testing/component-harness.js +19 -1
- package/esm2015/testing/harness-environment.js +7 -1
- package/esm2015/testing/testbed/fake-events/dispatch-events.js +5 -4
- package/esm2015/testing/testbed/fake-events/event-objects.js +10 -7
- package/esm2015/testing/testbed/fake-events/type-in-element.js +4 -4
- package/esm2015/testing/testbed/unit-test-element.js +20 -12
- package/esm2015/tree/control/nested-tree-control.js +7 -3
- package/esm2015/tree/tree.js +9 -23
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +88 -38
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/accordion.js +13 -6
- package/fesm2015/accordion.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/clipboard.js +6 -5
- package/fesm2015/clipboard.js.map +1 -1
- package/fesm2015/drag-drop.js +669 -600
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +215 -40
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/portal.js +4 -1
- package/fesm2015/portal.js.map +1 -1
- package/fesm2015/scrolling.js +60 -21
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +214 -61
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/testbed.js +35 -23
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/testing.js +25 -1
- package/fesm2015/testing.js.map +1 -1
- package/fesm2015/tree.js +13 -23
- package/fesm2015/tree.js.map +1 -1
- package/overlay/dispatchers/base-overlay-dispatcher.d.ts +28 -0
- package/overlay/dispatchers/index.d.ts +9 -0
- package/overlay/{keyboard → dispatchers}/overlay-keyboard-dispatcher.d.ts +4 -10
- package/overlay/dispatchers/overlay-outside-click-dispatcher.d.ts +27 -0
- package/overlay/index.d.ts +4 -3
- package/overlay/index.metadata.json +1 -1
- package/overlay/overlay-config.d.ts +4 -0
- package/overlay/overlay-directives.d.ts +5 -0
- package/overlay/overlay-ref.d.ts +8 -2
- package/overlay/overlay-reference.d.ts +1 -0
- package/overlay/overlay.d.ts +4 -2
- package/overlay/position/connected-position-strategy.d.ts +0 -2
- package/overlay/public-api.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/public-api.d.ts +1 -0
- package/scrolling/scrolling-module.d.ts +3 -0
- package/scrolling/viewport-ruler.d.ts +2 -2
- package/scrolling/virtual-for-of.d.ts +2 -1
- package/scrolling/virtual-scroll-repeater.d.ts +16 -0
- package/scrolling/virtual-scroll-viewport.d.ts +4 -4
- package/table/cell.d.ts +13 -0
- package/table/coalesced-style-scheduler.d.ts +41 -0
- package/table/index.metadata.json +1 -1
- package/table/public-api.d.ts +1 -0
- package/table/sticky-styler.d.ts +7 -1
- package/table/table.d.ts +9 -1
- package/testing/component-harness.d.ts +12 -0
- package/testing/harness-environment.d.ts +1 -0
- package/testing/testbed/fake-events/dispatch-events.d.ts +3 -2
- package/testing/testbed/fake-events/event-objects.d.ts +2 -2
- package/testing/testbed/unit-test-element.d.ts +7 -0
- package/tree/control/nested-tree-control.d.ts +7 -2
- package/tree/index.metadata.json +1 -1
- package/tree/tree.d.ts +2 -4
- package/esm2015/overlay/keyboard/overlay-keyboard-dispatcher.js +0 -96
|
@@ -192,23 +192,23 @@
|
|
|
192
192
|
CdkFixedSizeVirtualScroll.prototype.ngOnChanges = function () {
|
|
193
193
|
this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);
|
|
194
194
|
};
|
|
195
|
-
CdkFixedSizeVirtualScroll.decorators = [
|
|
196
|
-
{ type: i0.Directive, args: [{
|
|
197
|
-
selector: 'cdk-virtual-scroll-viewport[itemSize]',
|
|
198
|
-
providers: [{
|
|
199
|
-
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
200
|
-
useFactory: _fixedSizeVirtualScrollStrategyFactory,
|
|
201
|
-
deps: [i0.forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
|
|
202
|
-
}],
|
|
203
|
-
},] }
|
|
204
|
-
];
|
|
205
|
-
CdkFixedSizeVirtualScroll.propDecorators = {
|
|
206
|
-
itemSize: [{ type: i0.Input }],
|
|
207
|
-
minBufferPx: [{ type: i0.Input }],
|
|
208
|
-
maxBufferPx: [{ type: i0.Input }]
|
|
209
|
-
};
|
|
210
195
|
return CdkFixedSizeVirtualScroll;
|
|
211
196
|
}());
|
|
197
|
+
CdkFixedSizeVirtualScroll.decorators = [
|
|
198
|
+
{ type: i0.Directive, args: [{
|
|
199
|
+
selector: 'cdk-virtual-scroll-viewport[itemSize]',
|
|
200
|
+
providers: [{
|
|
201
|
+
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
202
|
+
useFactory: _fixedSizeVirtualScrollStrategyFactory,
|
|
203
|
+
deps: [i0.forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
|
|
204
|
+
}],
|
|
205
|
+
},] }
|
|
206
|
+
];
|
|
207
|
+
CdkFixedSizeVirtualScroll.propDecorators = {
|
|
208
|
+
itemSize: [{ type: i0.Input }],
|
|
209
|
+
minBufferPx: [{ type: i0.Input }],
|
|
210
|
+
maxBufferPx: [{ type: i0.Input }]
|
|
211
|
+
};
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* @license
|
|
@@ -366,17 +366,17 @@
|
|
|
366
366
|
this._globalSubscription = null;
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
|
-
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" });
|
|
370
|
-
ScrollDispatcher.decorators = [
|
|
371
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
372
|
-
];
|
|
373
|
-
ScrollDispatcher.ctorParameters = function () { return [
|
|
374
|
-
{ type: i0.NgZone },
|
|
375
|
-
{ type: i1.Platform },
|
|
376
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
|
|
377
|
-
]; };
|
|
378
369
|
return ScrollDispatcher;
|
|
379
370
|
}());
|
|
371
|
+
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" });
|
|
372
|
+
ScrollDispatcher.decorators = [
|
|
373
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
374
|
+
];
|
|
375
|
+
ScrollDispatcher.ctorParameters = function () { return [
|
|
376
|
+
{ type: i0.NgZone },
|
|
377
|
+
{ type: i1.Platform },
|
|
378
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
|
|
379
|
+
]; };
|
|
380
380
|
|
|
381
381
|
/**
|
|
382
382
|
* @license
|
|
@@ -398,12 +398,8 @@
|
|
|
398
398
|
this.ngZone = ngZone;
|
|
399
399
|
this.dir = dir;
|
|
400
400
|
this._destroyed = new rxjs.Subject();
|
|
401
|
-
this._elementScrolled = new rxjs.Observable(function (observer) {
|
|
402
|
-
|
|
403
|
-
return rxjs.fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(operators.takeUntil(_this._destroyed))
|
|
404
|
-
.subscribe(observer);
|
|
405
|
-
});
|
|
406
|
-
});
|
|
401
|
+
this._elementScrolled = new rxjs.Observable(function (observer) { return _this.ngZone.runOutsideAngular(function () { return rxjs.fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(operators.takeUntil(_this._destroyed))
|
|
402
|
+
.subscribe(observer); }); });
|
|
407
403
|
}
|
|
408
404
|
CdkScrollable.prototype.ngOnInit = function () {
|
|
409
405
|
this.scrollDispatcher.register(this);
|
|
@@ -537,246 +533,319 @@
|
|
|
537
533
|
}
|
|
538
534
|
}
|
|
539
535
|
};
|
|
540
|
-
CdkScrollable.decorators = [
|
|
541
|
-
{ type: i0.Directive, args: [{
|
|
542
|
-
selector: '[cdk-scrollable], [cdkScrollable]'
|
|
543
|
-
},] }
|
|
544
|
-
];
|
|
545
|
-
CdkScrollable.ctorParameters = function () { return [
|
|
546
|
-
{ type: i0.ElementRef },
|
|
547
|
-
{ type: ScrollDispatcher },
|
|
548
|
-
{ type: i0.NgZone },
|
|
549
|
-
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
|
|
550
|
-
]; };
|
|
551
536
|
return CdkScrollable;
|
|
552
537
|
}());
|
|
538
|
+
CdkScrollable.decorators = [
|
|
539
|
+
{ type: i0.Directive, args: [{
|
|
540
|
+
selector: '[cdk-scrollable], [cdkScrollable]'
|
|
541
|
+
},] }
|
|
542
|
+
];
|
|
543
|
+
CdkScrollable.ctorParameters = function () { return [
|
|
544
|
+
{ type: i0.ElementRef },
|
|
545
|
+
{ type: ScrollDispatcher },
|
|
546
|
+
{ type: i0.NgZone },
|
|
547
|
+
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
|
|
548
|
+
]; };
|
|
553
549
|
|
|
554
|
-
/*! *****************************************************************************
|
|
555
|
-
Copyright (c) Microsoft Corporation.
|
|
556
|
-
|
|
557
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
558
|
-
purpose with or without fee is hereby granted.
|
|
559
|
-
|
|
560
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
561
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
562
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
563
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
564
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
565
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
566
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
567
|
-
***************************************************************************** */
|
|
568
|
-
/* global Reflect, Promise */
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
function __extends(d, b) {
|
|
578
|
-
extendStatics(d, b);
|
|
579
|
-
function __() { this.constructor = d; }
|
|
580
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
function __rest(s, e) {
|
|
595
|
-
var t = {};
|
|
596
|
-
for (var p in s)
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
function __decorate(decorators, target, key, desc) {
|
|
607
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
608
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
return
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
function
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
550
|
+
/*! *****************************************************************************
|
|
551
|
+
Copyright (c) Microsoft Corporation.
|
|
552
|
+
|
|
553
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
554
|
+
purpose with or without fee is hereby granted.
|
|
555
|
+
|
|
556
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
557
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
558
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
559
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
560
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
561
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
562
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
563
|
+
***************************************************************************** */
|
|
564
|
+
/* global Reflect, Promise */
|
|
565
|
+
var extendStatics = function (d, b) {
|
|
566
|
+
extendStatics = Object.setPrototypeOf ||
|
|
567
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
568
|
+
function (d, b) { for (var p in b)
|
|
569
|
+
if (b.hasOwnProperty(p))
|
|
570
|
+
d[p] = b[p]; };
|
|
571
|
+
return extendStatics(d, b);
|
|
572
|
+
};
|
|
573
|
+
function __extends(d, b) {
|
|
574
|
+
extendStatics(d, b);
|
|
575
|
+
function __() { this.constructor = d; }
|
|
576
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
577
|
+
}
|
|
578
|
+
var __assign = function () {
|
|
579
|
+
__assign = Object.assign || function __assign(t) {
|
|
580
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
581
|
+
s = arguments[i];
|
|
582
|
+
for (var p in s)
|
|
583
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
584
|
+
t[p] = s[p];
|
|
585
|
+
}
|
|
586
|
+
return t;
|
|
587
|
+
};
|
|
588
|
+
return __assign.apply(this, arguments);
|
|
589
|
+
};
|
|
590
|
+
function __rest(s, e) {
|
|
591
|
+
var t = {};
|
|
592
|
+
for (var p in s)
|
|
593
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
594
|
+
t[p] = s[p];
|
|
595
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
596
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
597
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
598
|
+
t[p[i]] = s[p[i]];
|
|
599
|
+
}
|
|
600
|
+
return t;
|
|
601
|
+
}
|
|
602
|
+
function __decorate(decorators, target, key, desc) {
|
|
603
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
604
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
605
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
606
|
+
else
|
|
607
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
608
|
+
if (d = decorators[i])
|
|
609
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
610
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
611
|
+
}
|
|
612
|
+
function __param(paramIndex, decorator) {
|
|
613
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
614
|
+
}
|
|
615
|
+
function __metadata(metadataKey, metadataValue) {
|
|
616
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
617
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
618
|
+
}
|
|
619
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
620
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
621
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
622
|
+
function fulfilled(value) { try {
|
|
623
|
+
step(generator.next(value));
|
|
624
|
+
}
|
|
625
|
+
catch (e) {
|
|
626
|
+
reject(e);
|
|
627
|
+
} }
|
|
628
|
+
function rejected(value) { try {
|
|
629
|
+
step(generator["throw"](value));
|
|
630
|
+
}
|
|
631
|
+
catch (e) {
|
|
632
|
+
reject(e);
|
|
633
|
+
} }
|
|
634
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
635
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
function __generator(thisArg, body) {
|
|
639
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
640
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
641
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
642
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
643
|
+
function step(op) {
|
|
644
|
+
if (f)
|
|
645
|
+
throw new TypeError("Generator is already executing.");
|
|
646
|
+
while (_)
|
|
647
|
+
try {
|
|
648
|
+
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)
|
|
649
|
+
return t;
|
|
650
|
+
if (y = 0, t)
|
|
651
|
+
op = [op[0] & 2, t.value];
|
|
652
|
+
switch (op[0]) {
|
|
653
|
+
case 0:
|
|
654
|
+
case 1:
|
|
655
|
+
t = op;
|
|
656
|
+
break;
|
|
657
|
+
case 4:
|
|
658
|
+
_.label++;
|
|
659
|
+
return { value: op[1], done: false };
|
|
660
|
+
case 5:
|
|
661
|
+
_.label++;
|
|
662
|
+
y = op[1];
|
|
663
|
+
op = [0];
|
|
664
|
+
continue;
|
|
665
|
+
case 7:
|
|
666
|
+
op = _.ops.pop();
|
|
667
|
+
_.trys.pop();
|
|
668
|
+
continue;
|
|
669
|
+
default:
|
|
670
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
671
|
+
_ = 0;
|
|
672
|
+
continue;
|
|
673
|
+
}
|
|
674
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
675
|
+
_.label = op[1];
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
679
|
+
_.label = t[1];
|
|
680
|
+
t = op;
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
if (t && _.label < t[2]) {
|
|
684
|
+
_.label = t[2];
|
|
685
|
+
_.ops.push(op);
|
|
686
|
+
break;
|
|
687
|
+
}
|
|
688
|
+
if (t[2])
|
|
689
|
+
_.ops.pop();
|
|
690
|
+
_.trys.pop();
|
|
691
|
+
continue;
|
|
692
|
+
}
|
|
693
|
+
op = body.call(thisArg, _);
|
|
694
|
+
}
|
|
695
|
+
catch (e) {
|
|
696
|
+
op = [6, e];
|
|
697
|
+
y = 0;
|
|
698
|
+
}
|
|
699
|
+
finally {
|
|
700
|
+
f = t = 0;
|
|
701
|
+
}
|
|
702
|
+
if (op[0] & 5)
|
|
703
|
+
throw op[1];
|
|
704
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
708
|
+
if (k2 === undefined)
|
|
709
|
+
k2 = k;
|
|
710
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
711
|
+
}) : (function (o, m, k, k2) {
|
|
712
|
+
if (k2 === undefined)
|
|
713
|
+
k2 = k;
|
|
714
|
+
o[k2] = m[k];
|
|
715
|
+
});
|
|
716
|
+
function __exportStar(m, exports) {
|
|
717
|
+
for (var p in m)
|
|
718
|
+
if (p !== "default" && !exports.hasOwnProperty(p))
|
|
719
|
+
__createBinding(exports, m, p);
|
|
720
|
+
}
|
|
721
|
+
function __values(o) {
|
|
722
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
723
|
+
if (m)
|
|
724
|
+
return m.call(o);
|
|
725
|
+
if (o && typeof o.length === "number")
|
|
726
|
+
return {
|
|
727
|
+
next: function () {
|
|
728
|
+
if (o && i >= o.length)
|
|
729
|
+
o = void 0;
|
|
730
|
+
return { value: o && o[i++], done: !o };
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
734
|
+
}
|
|
735
|
+
function __read(o, n) {
|
|
736
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
737
|
+
if (!m)
|
|
738
|
+
return o;
|
|
739
|
+
var i = m.call(o), r, ar = [], e;
|
|
740
|
+
try {
|
|
741
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
742
|
+
ar.push(r.value);
|
|
743
|
+
}
|
|
744
|
+
catch (error) {
|
|
745
|
+
e = { error: error };
|
|
746
|
+
}
|
|
747
|
+
finally {
|
|
748
|
+
try {
|
|
749
|
+
if (r && !r.done && (m = i["return"]))
|
|
750
|
+
m.call(i);
|
|
751
|
+
}
|
|
752
|
+
finally {
|
|
753
|
+
if (e)
|
|
754
|
+
throw e.error;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return ar;
|
|
758
|
+
}
|
|
759
|
+
function __spread() {
|
|
760
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
761
|
+
ar = ar.concat(__read(arguments[i]));
|
|
762
|
+
return ar;
|
|
763
|
+
}
|
|
764
|
+
function __spreadArrays() {
|
|
765
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
766
|
+
s += arguments[i].length;
|
|
767
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
768
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
769
|
+
r[k] = a[j];
|
|
770
|
+
return r;
|
|
771
|
+
}
|
|
772
|
+
;
|
|
773
|
+
function __await(v) {
|
|
774
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
775
|
+
}
|
|
776
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
777
|
+
if (!Symbol.asyncIterator)
|
|
778
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
779
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
780
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
781
|
+
function verb(n) { if (g[n])
|
|
782
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
783
|
+
function resume(n, v) { try {
|
|
784
|
+
step(g[n](v));
|
|
785
|
+
}
|
|
786
|
+
catch (e) {
|
|
787
|
+
settle(q[0][3], e);
|
|
788
|
+
} }
|
|
789
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
790
|
+
function fulfill(value) { resume("next", value); }
|
|
791
|
+
function reject(value) { resume("throw", value); }
|
|
792
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
793
|
+
resume(q[0][0], q[0][1]); }
|
|
794
|
+
}
|
|
795
|
+
function __asyncDelegator(o) {
|
|
796
|
+
var i, p;
|
|
797
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
798
|
+
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; }
|
|
799
|
+
}
|
|
800
|
+
function __asyncValues(o) {
|
|
801
|
+
if (!Symbol.asyncIterator)
|
|
802
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
803
|
+
var m = o[Symbol.asyncIterator], i;
|
|
804
|
+
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);
|
|
805
|
+
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); }); }; }
|
|
806
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
807
|
+
}
|
|
808
|
+
function __makeTemplateObject(cooked, raw) {
|
|
809
|
+
if (Object.defineProperty) {
|
|
810
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
cooked.raw = raw;
|
|
814
|
+
}
|
|
815
|
+
return cooked;
|
|
816
|
+
}
|
|
817
|
+
;
|
|
818
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
819
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
820
|
+
}) : function (o, v) {
|
|
821
|
+
o["default"] = v;
|
|
822
|
+
};
|
|
823
|
+
function __importStar(mod) {
|
|
824
|
+
if (mod && mod.__esModule)
|
|
825
|
+
return mod;
|
|
826
|
+
var result = {};
|
|
827
|
+
if (mod != null)
|
|
828
|
+
for (var k in mod)
|
|
829
|
+
if (Object.hasOwnProperty.call(mod, k))
|
|
830
|
+
__createBinding(result, mod, k);
|
|
831
|
+
__setModuleDefault(result, mod);
|
|
832
|
+
return result;
|
|
833
|
+
}
|
|
834
|
+
function __importDefault(mod) {
|
|
835
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
836
|
+
}
|
|
837
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
838
|
+
if (!privateMap.has(receiver)) {
|
|
839
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
840
|
+
}
|
|
841
|
+
return privateMap.get(receiver);
|
|
842
|
+
}
|
|
843
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
844
|
+
if (!privateMap.has(receiver)) {
|
|
845
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
846
|
+
}
|
|
847
|
+
privateMap.set(receiver, value);
|
|
848
|
+
return value;
|
|
780
849
|
}
|
|
781
850
|
|
|
782
851
|
/**
|
|
@@ -798,19 +867,33 @@
|
|
|
798
867
|
document) {
|
|
799
868
|
var _this = this;
|
|
800
869
|
this._platform = _platform;
|
|
870
|
+
/** Stream of viewport change events. */
|
|
871
|
+
this._change = new rxjs.Subject();
|
|
872
|
+
/** Event listener that will be used to handle the viewport change events. */
|
|
873
|
+
this._changeListener = function (event) {
|
|
874
|
+
_this._change.next(event);
|
|
875
|
+
};
|
|
801
876
|
this._document = document;
|
|
802
877
|
ngZone.runOutsideAngular(function () {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
878
|
+
if (_platform.isBrowser) {
|
|
879
|
+
var window = _this._getWindow();
|
|
880
|
+
// Note that bind the events ourselves, rather than going through something like RxJS's
|
|
881
|
+
// `fromEvent` so that we can ensure that they're bound outside of the NgZone.
|
|
882
|
+
window.addEventListener('resize', _this._changeListener);
|
|
883
|
+
window.addEventListener('orientationchange', _this._changeListener);
|
|
884
|
+
}
|
|
885
|
+
// We don't need to keep track of the subscription,
|
|
886
|
+
// because we complete the `change` stream on destroy.
|
|
887
|
+
_this.change().subscribe(function () { return _this._updateViewportSize(); });
|
|
810
888
|
});
|
|
811
889
|
}
|
|
812
890
|
ViewportRuler.prototype.ngOnDestroy = function () {
|
|
813
|
-
this.
|
|
891
|
+
if (this._platform.isBrowser) {
|
|
892
|
+
var window = this._getWindow();
|
|
893
|
+
window.removeEventListener('resize', this._changeListener);
|
|
894
|
+
window.removeEventListener('orientationchange', this._changeListener);
|
|
895
|
+
}
|
|
896
|
+
this._change.complete();
|
|
814
897
|
};
|
|
815
898
|
/** Returns the viewport's width and height. */
|
|
816
899
|
ViewportRuler.prototype.getViewportSize = function () {
|
|
@@ -893,25 +976,18 @@
|
|
|
893
976
|
{ width: window.innerWidth, height: window.innerHeight } :
|
|
894
977
|
{ width: 0, height: 0 };
|
|
895
978
|
};
|
|
896
|
-
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" });
|
|
897
|
-
ViewportRuler.decorators = [
|
|
898
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
899
|
-
];
|
|
900
|
-
ViewportRuler.ctorParameters = function () { return [
|
|
901
|
-
{ type: i1.Platform },
|
|
902
|
-
{ type: i0.NgZone },
|
|
903
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
|
|
904
|
-
]; };
|
|
905
979
|
return ViewportRuler;
|
|
906
980
|
}());
|
|
981
|
+
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" });
|
|
982
|
+
ViewportRuler.decorators = [
|
|
983
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
984
|
+
];
|
|
985
|
+
ViewportRuler.ctorParameters = function () { return [
|
|
986
|
+
{ type: i1.Platform },
|
|
987
|
+
{ type: i0.NgZone },
|
|
988
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
|
|
989
|
+
]; };
|
|
907
990
|
|
|
908
|
-
/**
|
|
909
|
-
* @license
|
|
910
|
-
* Copyright Google LLC All Rights Reserved.
|
|
911
|
-
*
|
|
912
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
913
|
-
* found in the LICENSE file at https://angular.io/license
|
|
914
|
-
*/
|
|
915
991
|
/** Checks if the given ranges are equal. */
|
|
916
992
|
function rangesEqual(r1, r2) {
|
|
917
993
|
return r1.start == r2.start && r1.end == r2.end;
|
|
@@ -945,11 +1021,7 @@
|
|
|
945
1021
|
// depending on how the strategy calculates the scrolled index, it may come at a cost to
|
|
946
1022
|
// performance.
|
|
947
1023
|
/** Emits when the index of the first element visible in the viewport changes. */
|
|
948
|
-
_this.scrolledIndexChange = new rxjs.Observable(function (observer) {
|
|
949
|
-
return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) {
|
|
950
|
-
return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); });
|
|
951
|
-
});
|
|
952
|
-
});
|
|
1024
|
+
_this.scrolledIndexChange = new rxjs.Observable(function (observer) { return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) { return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); }); }); });
|
|
953
1025
|
/** A stream that emits whenever the rendered range changes. */
|
|
954
1026
|
_this.renderedRangeStream = _this._renderedRangeSubject.asObservable();
|
|
955
1027
|
/**
|
|
@@ -1035,7 +1107,7 @@
|
|
|
1035
1107
|
this._viewportChanges.unsubscribe();
|
|
1036
1108
|
_super.prototype.ngOnDestroy.call(this);
|
|
1037
1109
|
};
|
|
1038
|
-
/** Attaches a `
|
|
1110
|
+
/** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
|
|
1039
1111
|
CdkVirtualScrollViewport.prototype.attach = function (forOf) {
|
|
1040
1112
|
var _this = this;
|
|
1041
1113
|
if (this._forOf) {
|
|
@@ -1256,56 +1328,52 @@
|
|
|
1256
1328
|
this._totalContentWidth =
|
|
1257
1329
|
this.orientation === 'horizontal' ? this._totalContentSize + "px" : '';
|
|
1258
1330
|
};
|
|
1259
|
-
CdkVirtualScrollViewport.decorators = [
|
|
1260
|
-
{ type: i0.Component, args: [{
|
|
1261
|
-
selector: 'cdk-virtual-scroll-viewport',
|
|
1262
|
-
template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n",
|
|
1263
|
-
host: {
|
|
1264
|
-
'class': 'cdk-virtual-scroll-viewport',
|
|
1265
|
-
'[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
|
|
1266
|
-
'[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
|
|
1267
|
-
},
|
|
1268
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1269
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1270
|
-
providers: [{
|
|
1271
|
-
provide: CdkScrollable,
|
|
1272
|
-
useExisting: CdkVirtualScrollViewport,
|
|
1273
|
-
}],
|
|
1274
|
-
styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"]
|
|
1275
|
-
},] }
|
|
1276
|
-
];
|
|
1277
|
-
CdkVirtualScrollViewport.ctorParameters = function () { return [
|
|
1278
|
-
{ type: i0.ElementRef },
|
|
1279
|
-
{ type: i0.ChangeDetectorRef },
|
|
1280
|
-
{ type: i0.NgZone },
|
|
1281
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [VIRTUAL_SCROLL_STRATEGY,] }] },
|
|
1282
|
-
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
|
|
1283
|
-
{ type: ScrollDispatcher },
|
|
1284
|
-
{ type: ViewportRuler, decorators: [{ type: i0.Optional }] }
|
|
1285
|
-
]; };
|
|
1286
|
-
CdkVirtualScrollViewport.propDecorators = {
|
|
1287
|
-
orientation: [{ type: i0.Input }],
|
|
1288
|
-
scrolledIndexChange: [{ type: i0.Output }],
|
|
1289
|
-
_contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { static: true },] }]
|
|
1290
|
-
};
|
|
1291
1331
|
return CdkVirtualScrollViewport;
|
|
1292
1332
|
}(CdkScrollable));
|
|
1333
|
+
CdkVirtualScrollViewport.decorators = [
|
|
1334
|
+
{ type: i0.Component, args: [{
|
|
1335
|
+
selector: 'cdk-virtual-scroll-viewport',
|
|
1336
|
+
template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n",
|
|
1337
|
+
host: {
|
|
1338
|
+
'class': 'cdk-virtual-scroll-viewport',
|
|
1339
|
+
'[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
|
|
1340
|
+
'[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
|
|
1341
|
+
},
|
|
1342
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1343
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1344
|
+
providers: [{
|
|
1345
|
+
provide: CdkScrollable,
|
|
1346
|
+
useExisting: CdkVirtualScrollViewport,
|
|
1347
|
+
}],
|
|
1348
|
+
styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"]
|
|
1349
|
+
},] }
|
|
1350
|
+
];
|
|
1351
|
+
CdkVirtualScrollViewport.ctorParameters = function () { return [
|
|
1352
|
+
{ type: i0.ElementRef },
|
|
1353
|
+
{ type: i0.ChangeDetectorRef },
|
|
1354
|
+
{ type: i0.NgZone },
|
|
1355
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [VIRTUAL_SCROLL_STRATEGY,] }] },
|
|
1356
|
+
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
|
|
1357
|
+
{ type: ScrollDispatcher },
|
|
1358
|
+
{ type: ViewportRuler, decorators: [{ type: i0.Optional }] }
|
|
1359
|
+
]; };
|
|
1360
|
+
CdkVirtualScrollViewport.propDecorators = {
|
|
1361
|
+
orientation: [{ type: i0.Input }],
|
|
1362
|
+
scrolledIndexChange: [{ type: i0.Output }],
|
|
1363
|
+
_contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { static: true },] }]
|
|
1364
|
+
};
|
|
1293
1365
|
|
|
1294
|
-
/**
|
|
1295
|
-
|
|
1296
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1297
|
-
*
|
|
1298
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1299
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1300
|
-
*/
|
|
1301
|
-
/** Helper to extract size from a DOM Node. */
|
|
1302
|
-
function getSize(orientation, node) {
|
|
1366
|
+
/** Helper to extract the offset of a DOM Node in a certain direction. */
|
|
1367
|
+
function getOffset(orientation, direction, node) {
|
|
1303
1368
|
var el = node;
|
|
1304
1369
|
if (!el.getBoundingClientRect) {
|
|
1305
1370
|
return 0;
|
|
1306
1371
|
}
|
|
1307
1372
|
var rect = el.getBoundingClientRect();
|
|
1308
|
-
|
|
1373
|
+
if (orientation === 'horizontal') {
|
|
1374
|
+
return direction === 'start' ? rect.left : rect.right;
|
|
1375
|
+
}
|
|
1376
|
+
return direction === 'start' ? rect.top : rect.bottom;
|
|
1309
1377
|
}
|
|
1310
1378
|
/**
|
|
1311
1379
|
* A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling
|
|
@@ -1436,17 +1504,28 @@
|
|
|
1436
1504
|
var renderedStartIndex = range.start - this._renderedRange.start;
|
|
1437
1505
|
// The length of the range we're measuring.
|
|
1438
1506
|
var rangeLen = range.end - range.start;
|
|
1439
|
-
// Loop over all
|
|
1440
|
-
|
|
1441
|
-
var
|
|
1442
|
-
|
|
1507
|
+
// Loop over all the views, find the first and land node and compute the size by subtracting
|
|
1508
|
+
// the top of the first node from the bottom of the last one.
|
|
1509
|
+
var firstNode;
|
|
1510
|
+
var lastNode;
|
|
1511
|
+
// Find the first node by starting from the beginning and going forwards.
|
|
1512
|
+
for (var i = 0; i < rangeLen; i++) {
|
|
1513
|
+
var view = this._viewContainerRef.get(i + renderedStartIndex);
|
|
1514
|
+
if (view && view.rootNodes.length) {
|
|
1515
|
+
firstNode = lastNode = view.rootNodes[0];
|
|
1516
|
+
break;
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
// Find the last node by starting from the end and going backwards.
|
|
1520
|
+
for (var i = rangeLen - 1; i > -1; i--) {
|
|
1443
1521
|
var view = this._viewContainerRef.get(i + renderedStartIndex);
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1522
|
+
if (view && view.rootNodes.length) {
|
|
1523
|
+
lastNode = view.rootNodes[view.rootNodes.length - 1];
|
|
1524
|
+
break;
|
|
1447
1525
|
}
|
|
1448
1526
|
}
|
|
1449
|
-
return
|
|
1527
|
+
return firstNode && lastNode ?
|
|
1528
|
+
getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode) : 0;
|
|
1450
1529
|
};
|
|
1451
1530
|
CdkVirtualForOf.prototype.ngDoCheck = function () {
|
|
1452
1531
|
if (this._differ && this._needsUpdate) {
|
|
@@ -1609,26 +1688,26 @@
|
|
|
1609
1688
|
CdkVirtualForOf.prototype._detachView = function (index) {
|
|
1610
1689
|
return this._viewContainerRef.detach(index);
|
|
1611
1690
|
};
|
|
1612
|
-
CdkVirtualForOf.decorators = [
|
|
1613
|
-
{ type: i0.Directive, args: [{
|
|
1614
|
-
selector: '[cdkVirtualFor][cdkVirtualForOf]',
|
|
1615
|
-
},] }
|
|
1616
|
-
];
|
|
1617
|
-
CdkVirtualForOf.ctorParameters = function () { return [
|
|
1618
|
-
{ type: i0.ViewContainerRef },
|
|
1619
|
-
{ type: i0.TemplateRef },
|
|
1620
|
-
{ type: i0.IterableDiffers },
|
|
1621
|
-
{ type: CdkVirtualScrollViewport, decorators: [{ type: i0.SkipSelf }] },
|
|
1622
|
-
{ type: i0.NgZone }
|
|
1623
|
-
]; };
|
|
1624
|
-
CdkVirtualForOf.propDecorators = {
|
|
1625
|
-
cdkVirtualForOf: [{ type: i0.Input }],
|
|
1626
|
-
cdkVirtualForTrackBy: [{ type: i0.Input }],
|
|
1627
|
-
cdkVirtualForTemplate: [{ type: i0.Input }],
|
|
1628
|
-
cdkVirtualForTemplateCacheSize: [{ type: i0.Input }]
|
|
1629
|
-
};
|
|
1630
1691
|
return CdkVirtualForOf;
|
|
1631
1692
|
}());
|
|
1693
|
+
CdkVirtualForOf.decorators = [
|
|
1694
|
+
{ type: i0.Directive, args: [{
|
|
1695
|
+
selector: '[cdkVirtualFor][cdkVirtualForOf]',
|
|
1696
|
+
},] }
|
|
1697
|
+
];
|
|
1698
|
+
CdkVirtualForOf.ctorParameters = function () { return [
|
|
1699
|
+
{ type: i0.ViewContainerRef },
|
|
1700
|
+
{ type: i0.TemplateRef },
|
|
1701
|
+
{ type: i0.IterableDiffers },
|
|
1702
|
+
{ type: CdkVirtualScrollViewport, decorators: [{ type: i0.SkipSelf }] },
|
|
1703
|
+
{ type: i0.NgZone }
|
|
1704
|
+
]; };
|
|
1705
|
+
CdkVirtualForOf.propDecorators = {
|
|
1706
|
+
cdkVirtualForOf: [{ type: i0.Input }],
|
|
1707
|
+
cdkVirtualForTrackBy: [{ type: i0.Input }],
|
|
1708
|
+
cdkVirtualForTemplate: [{ type: i0.Input }],
|
|
1709
|
+
cdkVirtualForTemplateCacheSize: [{ type: i0.Input }]
|
|
1710
|
+
};
|
|
1632
1711
|
|
|
1633
1712
|
/**
|
|
1634
1713
|
* @license
|
|
@@ -1640,40 +1719,51 @@
|
|
|
1640
1719
|
var CdkScrollableModule = /** @class */ (function () {
|
|
1641
1720
|
function CdkScrollableModule() {
|
|
1642
1721
|
}
|
|
1643
|
-
CdkScrollableModule.decorators = [
|
|
1644
|
-
{ type: i0.NgModule, args: [{
|
|
1645
|
-
exports: [CdkScrollable],
|
|
1646
|
-
declarations: [CdkScrollable]
|
|
1647
|
-
},] }
|
|
1648
|
-
];
|
|
1649
1722
|
return CdkScrollableModule;
|
|
1650
1723
|
}());
|
|
1724
|
+
CdkScrollableModule.decorators = [
|
|
1725
|
+
{ type: i0.NgModule, args: [{
|
|
1726
|
+
exports: [CdkScrollable],
|
|
1727
|
+
declarations: [CdkScrollable]
|
|
1728
|
+
},] }
|
|
1729
|
+
];
|
|
1730
|
+
/**
|
|
1731
|
+
* @docs-primary-export
|
|
1732
|
+
*/
|
|
1651
1733
|
var ScrollingModule = /** @class */ (function () {
|
|
1652
1734
|
function ScrollingModule() {
|
|
1653
1735
|
}
|
|
1654
|
-
ScrollingModule.decorators = [
|
|
1655
|
-
{ type: i0.NgModule, args: [{
|
|
1656
|
-
imports: [
|
|
1657
|
-
bidi.BidiModule,
|
|
1658
|
-
i1.PlatformModule,
|
|
1659
|
-
CdkScrollableModule
|
|
1660
|
-
],
|
|
1661
|
-
exports: [
|
|
1662
|
-
bidi.BidiModule,
|
|
1663
|
-
CdkScrollableModule,
|
|
1664
|
-
CdkFixedSizeVirtualScroll,
|
|
1665
|
-
CdkVirtualForOf,
|
|
1666
|
-
CdkVirtualScrollViewport,
|
|
1667
|
-
],
|
|
1668
|
-
declarations: [
|
|
1669
|
-
CdkFixedSizeVirtualScroll,
|
|
1670
|
-
CdkVirtualForOf,
|
|
1671
|
-
CdkVirtualScrollViewport,
|
|
1672
|
-
],
|
|
1673
|
-
},] }
|
|
1674
|
-
];
|
|
1675
1736
|
return ScrollingModule;
|
|
1676
1737
|
}());
|
|
1738
|
+
ScrollingModule.decorators = [
|
|
1739
|
+
{ type: i0.NgModule, args: [{
|
|
1740
|
+
imports: [
|
|
1741
|
+
bidi.BidiModule,
|
|
1742
|
+
i1.PlatformModule,
|
|
1743
|
+
CdkScrollableModule
|
|
1744
|
+
],
|
|
1745
|
+
exports: [
|
|
1746
|
+
bidi.BidiModule,
|
|
1747
|
+
CdkScrollableModule,
|
|
1748
|
+
CdkFixedSizeVirtualScroll,
|
|
1749
|
+
CdkVirtualForOf,
|
|
1750
|
+
CdkVirtualScrollViewport,
|
|
1751
|
+
],
|
|
1752
|
+
declarations: [
|
|
1753
|
+
CdkFixedSizeVirtualScroll,
|
|
1754
|
+
CdkVirtualForOf,
|
|
1755
|
+
CdkVirtualScrollViewport,
|
|
1756
|
+
],
|
|
1757
|
+
},] }
|
|
1758
|
+
];
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* @license
|
|
1762
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1763
|
+
*
|
|
1764
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1765
|
+
* found in the LICENSE file at https://angular.io/license
|
|
1766
|
+
*/
|
|
1677
1767
|
|
|
1678
1768
|
/**
|
|
1679
1769
|
* @license
|