@angular/cdk 8.1.0 → 8.1.4
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/bundles/cdk-overlay.umd.js +27 -11
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +84 -9
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +50 -13
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +6 -6
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +14 -13
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +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/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/overlay.js +28 -12
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/portal.js +52 -6
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +39 -13
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +2 -2
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/tree.js +13 -12
- package/esm2015/tree.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/overlay.es5.js +27 -11
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/portal.es5.js +81 -6
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +50 -13
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +6 -6
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/tree.es5.js +14 -13
- package/esm5/tree.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-container.d.ts +2 -2
- package/package.json +4 -4
- package/portal/typings/dom-portal-outlet.d.ts +6 -0
- package/portal/typings/index.metadata.json +1 -1
- package/portal/typings/portal-directives.d.ts +12 -0
- package/portal/typings/portal.d.ts +11 -0
- package/portal/typings/public-api.d.ts +0 -3
- package/schematics/ng-update/upgrade-data.js +1 -0
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/input-names-rule.js +3 -3
- package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js +2 -2
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +2936 -2820
- package/schematics/utils/ast.js +0 -2
- package/schematics/utils/ast.js.map +1 -1
- package/schematics/utils/build-component.js +3 -12
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/version-agnostic-typescript.js +12 -4
- package/schematics/utils/version-agnostic-typescript.js.map +1 -1
- package/scrolling/typings/index.metadata.json +1 -1
- package/scrolling/typings/virtual-scroll-viewport.d.ts +7 -5
- package/tree/typings/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-container.d.ts +2 -2
- package/typings/esm5/portal/dom-portal-outlet.d.ts +6 -0
- package/typings/esm5/portal/index.metadata.json +1 -1
- package/typings/esm5/portal/portal-directives.d.ts +12 -0
- package/typings/esm5/portal/portal.d.ts +11 -0
- package/typings/esm5/portal/public-api.d.ts +0 -3
- package/typings/esm5/scrolling/index.metadata.json +1 -1
- package/typings/esm5/scrolling/virtual-scroll-viewport.d.ts +7 -5
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-container.d.ts +2 -2
- package/typings/portal/dom-portal-outlet.d.ts +6 -0
- package/typings/portal/index.metadata.json +1 -1
- package/typings/portal/portal-directives.d.ts +12 -0
- package/typings/portal/portal.d.ts +11 -0
- package/typings/portal/public-api.d.ts +0 -3
- package/typings/scrolling/index.metadata.json +1 -1
- package/typings/scrolling/virtual-scroll-viewport.d.ts +7 -5
- package/typings/tree/index.metadata.json +1 -1
|
@@ -1005,10 +1005,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
|
|
|
1005
1005
|
* Emits when the rendered range changes.
|
|
1006
1006
|
*/
|
|
1007
1007
|
_this._renderedRangeSubject = new rxjs.Subject();
|
|
1008
|
-
|
|
1009
|
-
* The direction the viewport scrolls.
|
|
1010
|
-
*/
|
|
1011
|
-
_this.orientation = 'vertical';
|
|
1008
|
+
_this._orientation = 'vertical';
|
|
1012
1009
|
// Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
|
|
1013
1010
|
// strategy lazily (i.e. only if the user is actually listening to the events). We do this because
|
|
1014
1011
|
// depending on how the strategy calculates the scrolled index, it may come at a cost to
|
|
@@ -1039,15 +1036,18 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
|
|
|
1039
1036
|
* A stream that emits whenever the rendered range changes.
|
|
1040
1037
|
*/
|
|
1041
1038
|
_this.renderedRangeStream = _this._renderedRangeSubject.asObservable();
|
|
1042
|
-
/**
|
|
1043
|
-
* The transform used to scale the spacer to the same size as all content, including content that
|
|
1044
|
-
* is not currently rendered.
|
|
1045
|
-
*/
|
|
1046
|
-
_this._totalContentSizeTransform = '';
|
|
1047
1039
|
/**
|
|
1048
1040
|
* The total size of all content (in pixels), including content that is not currently rendered.
|
|
1049
1041
|
*/
|
|
1050
1042
|
_this._totalContentSize = 0;
|
|
1043
|
+
/**
|
|
1044
|
+
* A string representing the `style.width` property value to be used for the spacer element.
|
|
1045
|
+
*/
|
|
1046
|
+
_this._totalContentWidth = '';
|
|
1047
|
+
/**
|
|
1048
|
+
* A string representing the `style.height` property value to be used for the spacer element.
|
|
1049
|
+
*/
|
|
1050
|
+
_this._totalContentHeight = '';
|
|
1051
1051
|
/**
|
|
1052
1052
|
* The currently rendered range of indices.
|
|
1053
1053
|
*/
|
|
@@ -1082,6 +1082,28 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
return _this;
|
|
1084
1084
|
}
|
|
1085
|
+
Object.defineProperty(CdkVirtualScrollViewport.prototype, "orientation", {
|
|
1086
|
+
/** The direction the viewport scrolls. */
|
|
1087
|
+
get: /**
|
|
1088
|
+
* The direction the viewport scrolls.
|
|
1089
|
+
* @return {?}
|
|
1090
|
+
*/
|
|
1091
|
+
function () {
|
|
1092
|
+
return this._orientation;
|
|
1093
|
+
},
|
|
1094
|
+
set: /**
|
|
1095
|
+
* @param {?} orientation
|
|
1096
|
+
* @return {?}
|
|
1097
|
+
*/
|
|
1098
|
+
function (orientation) {
|
|
1099
|
+
if (this._orientation !== orientation) {
|
|
1100
|
+
this._orientation = orientation;
|
|
1101
|
+
this._calculateSpacerSize();
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
enumerable: true,
|
|
1105
|
+
configurable: true
|
|
1106
|
+
});
|
|
1085
1107
|
/**
|
|
1086
1108
|
* @return {?}
|
|
1087
1109
|
*/
|
|
@@ -1253,9 +1275,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
|
|
|
1253
1275
|
function (size) {
|
|
1254
1276
|
if (this._totalContentSize !== size) {
|
|
1255
1277
|
this._totalContentSize = size;
|
|
1256
|
-
|
|
1257
|
-
var axis = this.orientation == 'horizontal' ? 'X' : 'Y';
|
|
1258
|
-
this._totalContentSizeTransform = "scale" + axis + "(" + this._totalContentSize + ")";
|
|
1278
|
+
this._calculateSpacerSize();
|
|
1259
1279
|
this._markChangeDetectionNeeded();
|
|
1260
1280
|
}
|
|
1261
1281
|
};
|
|
@@ -1564,9 +1584,26 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
|
|
|
1564
1584
|
fn();
|
|
1565
1585
|
}
|
|
1566
1586
|
};
|
|
1587
|
+
/** Calculates the `style.width` and `style.height` for the spacer element. */
|
|
1588
|
+
/**
|
|
1589
|
+
* Calculates the `style.width` and `style.height` for the spacer element.
|
|
1590
|
+
* @private
|
|
1591
|
+
* @return {?}
|
|
1592
|
+
*/
|
|
1593
|
+
CdkVirtualScrollViewport.prototype._calculateSpacerSize = /**
|
|
1594
|
+
* Calculates the `style.width` and `style.height` for the spacer element.
|
|
1595
|
+
* @private
|
|
1596
|
+
* @return {?}
|
|
1597
|
+
*/
|
|
1598
|
+
function () {
|
|
1599
|
+
this._totalContentHeight =
|
|
1600
|
+
this.orientation === 'horizontal' ? '' : this._totalContentSize + "px";
|
|
1601
|
+
this._totalContentWidth =
|
|
1602
|
+
this.orientation === 'horizontal' ? this._totalContentSize + "px" : '';
|
|
1603
|
+
};
|
|
1567
1604
|
CdkVirtualScrollViewport.decorators = [
|
|
1568
1605
|
{ type: core.Component, args: [{selector: 'cdk-virtual-scroll-viewport',
|
|
1569
|
-
template: "<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\"><ng-content></ng-content></div><div class=\"cdk-virtual-scroll-spacer\" [style.
|
|
1606
|
+
template: "<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\"><ng-content></ng-content></div><div class=\"cdk-virtual-scroll-spacer\" [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>",
|
|
1570
1607
|
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:0}.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:0}.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}"],
|
|
1571
1608
|
host: {
|
|
1572
1609
|
'class': 'cdk-virtual-scroll-viewport',
|