@angular/cdk 10.1.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/bundles/cdk-a11y.umd.js +425 -373
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +34 -10
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +40 -40
- 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 +31 -31
- 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 +484 -425
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +68 -5
- 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 +442 -383
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +57 -11
- 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 +3 -10
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +351 -299
- 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 +432 -378
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +20 -19
- 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 +684 -588
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +7 -14
- 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 +301 -256
- 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 +326 -270
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +1 -16
- 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 +443 -394
- 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/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/bidi/directionality.js +1 -1
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -3
- package/esm2015/scrolling/scrolling-module.js +4 -1
- package/esm2015/table/cell.js +18 -3
- package/esm2015/table/coalesced-style-scheduler.js +21 -10
- package/esm2015/table/sticky-styler.js +21 -7
- package/esm2015/table/table.js +8 -2
- package/esm2015/tree/tree.js +9 -23
- package/esm2015/version.js +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/overlay.js +2 -2
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/scrolling.js +3 -0
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +65 -19
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tree.js +7 -21
- package/fesm2015/tree.js.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scrolling-module.d.ts +3 -0
- package/table/cell.d.ts +13 -0
- package/table/coalesced-style-scheduler.d.ts +1 -0
- package/table/index.metadata.json +1 -1
- package/table/sticky-styler.d.ts +5 -1
- package/table/table.d.ts +6 -0
- package/tree/index.metadata.json +1 -1
- package/tree/tree.d.ts +2 -4
|
@@ -12,22 +12,14 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function u(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function
|
|
15
|
+
***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function u(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return a}function f(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function p(e){return function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=e.apply(this,f(t))||this;return o._sticky=!1,o._hasStickyChanged=!1,o}return u(t,e),Object.defineProperty(t.prototype,"sticky",{get:function(){return this._sticky},set:function(e){var t=this._sticky;this._sticky=r.coerceBooleanProperty(e),this._hasStickyChanged=t!==this._sticky},enumerable:!1,configurable:!0}),t.prototype.hasStickyChanged=function(){var e=this._hasStickyChanged;return this._hasStickyChanged=!1,e},t.prototype.resetStickyChanged=function(){this._hasStickyChanged=!1},t}(e)}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright Google LLC All Rights Reserved.
|
|
19
19
|
*
|
|
20
20
|
* Use of this source code is governed by an MIT-style license that can be
|
|
21
21
|
* found in the LICENSE file at https://angular.io/license
|
|
22
|
-
*/
|
|
23
|
-
function p(e){return function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=e.apply(this,d(t))||this;return o._sticky=!1,o._hasStickyChanged=!1,o}return u(t,e),Object.defineProperty(t.prototype,"sticky",{get:function(){return this._sticky},set:function(e){var t=this._sticky;this._sticky=r.coerceBooleanProperty(e),this._hasStickyChanged=t!==this._sticky},enumerable:!1,configurable:!0}),t.prototype.hasStickyChanged=function(){var e=this._hasStickyChanged;return this._hasStickyChanged=!1,e},t.prototype.resetStickyChanged=function(){this._hasStickyChanged=!1},t}(e)}
|
|
24
|
-
/**
|
|
25
|
-
* @license
|
|
26
|
-
* Copyright Google LLC All Rights Reserved.
|
|
27
|
-
*
|
|
28
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
29
|
-
* found in the LICENSE file at https://angular.io/license
|
|
30
|
-
*/var y,_=new a.InjectionToken("CDK_TABLE"),w=new a.InjectionToken("text-column-options"),m=function(){function e(e){this.template=e}return e.decorators=[{type:a.Directive,args:[{selector:"[cdkCellDef]"}]}],e.ctorParameters=function(){return[{type:a.TemplateRef}]},e}(),g=function(){function e(e){this.template=e}return e.decorators=[{type:a.Directive,args:[{selector:"[cdkHeaderCellDef]"}]}],e.ctorParameters=function(){return[{type:a.TemplateRef}]},e}(),D=function(){function e(e){this.template=e}return e.decorators=[{type:a.Directive,args:[{selector:"[cdkFooterCellDef]"}]}],e.ctorParameters=function(){return[{type:a.TemplateRef}]},e}(),R=function(e){function t(t){var r=e.call(this)||this;return r._table=t,r._stickyEnd=!1,r}return u(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stickyEnd",{get:function(){return this._stickyEnd},set:function(e){var t=this._stickyEnd;this._stickyEnd=r.coerceBooleanProperty(e),this._hasStickyChanged=t!==this._stickyEnd},enumerable:!1,configurable:!0}),t.decorators=[{type:a.Directive,args:[{selector:"[cdkColumnDef]",inputs:["sticky"],providers:[{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:a.Inject,args:[_]},{type:a.Optional}]}]},t.propDecorators={name:[{type:a.Input,args:["cdkColumnDef"]}],stickyEnd:[{type:a.Input,args:["stickyEnd"]}],cell:[{type:a.ContentChild,args:[m]}],headerCell:[{type:a.ContentChild,args:[g]}],footerCell:[{type:a.ContentChild,args:[D]}]},t}(p((function C(){}))),v=function(e){function t(t,r){return e.call(this,t,r)||this}return u(t,e),t.decorators=[{type:a.Directive,args:[{selector:"cdk-header-cell, th[cdk-header-cell]",host:{class:"cdk-header-cell",role:"columnheader"}}]}],t.ctorParameters=function(){return[{type:R},{type:a.ElementRef}]},t}(y=function y(e,t){t.nativeElement.classList.add("cdk-column-"+e.cssClassFriendlyName)}),k=function(e){function t(t,r){return e.call(this,t,r)||this}return u(t,e),t.decorators=[{type:a.Directive,args:[{selector:"cdk-footer-cell, td[cdk-footer-cell]",host:{class:"cdk-footer-cell",role:"gridcell"}}]}],t.ctorParameters=function(){return[{type:R},{type:a.ElementRef}]},t}(y),S=function(e){function t(t,r){return e.call(this,t,r)||this}return u(t,e),t.decorators=[{type:a.Directive,args:[{selector:"cdk-cell, td[cdk-cell]",host:{class:"cdk-cell",role:"gridcell"}}]}],t.ctorParameters=function(){return[{type:R},{type:a.ElementRef}]},t}(y),b=function b(){this.tasks=[],this.endTasks=[]},O=function(){function e(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new s.Subject}return e.prototype.schedule=function(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)},e.prototype.scheduleEnd=function(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)},e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},e.prototype._createScheduleIfNeeded=function(){var e=this;this._currentSchedule||(this._currentSchedule=new b,this._ngZone.onStable.pipe(c.take(1),c.takeUntil(this._destroyed)).subscribe((function(){var t,r,o,n,i=e._currentSchedule;e._currentSchedule=null;try{for(var a=f(i.tasks),s=a.next();!s.done;s=a.next())(0,s.value)()}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}try{for(var c=f(i.endTasks),l=c.next();!l.done;l=c.next())(0,l.value)()}catch(e){o={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(o)throw o.error}}})))},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:a.NgZone}]},e}(),x="<ng-container cdkCellOutlet></ng-container>",E=function(){function e(e,t){this.template=e,this._differs=t}return e.prototype.ngOnChanges=function(e){if(!this._columnsDiffer){var t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}},e.prototype.getColumnsDiff=function(){return this._columnsDiffer.diff(this.columns)},e.prototype.extractCellTemplate=function(e){return this instanceof T?e.headerCell.template:this instanceof N?e.footerCell.template:e.cell.template},e.decorators=[{type:a.Directive}],e.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers}]},e}(),T=function(e){function t(t,r,o){var n=e.call(this,t,r)||this;return n._table=o,n}return u(t,e),t.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t)},t.decorators=[{type:a.Directive,args:[{selector:"[cdkHeaderRowDef]",inputs:["columns: cdkHeaderRowDef","sticky: cdkHeaderRowDefSticky"]}]}],t.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers},{type:void 0,decorators:[{type:a.Inject,args:[_]},{type:a.Optional}]}]},t}(p(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(E))),N=function(e){function t(t,r,o){var n=e.call(this,t,r)||this;return n._table=o,n}return u(t,e),t.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t)},t.decorators=[{type:a.Directive,args:[{selector:"[cdkFooterRowDef]",inputs:["columns: cdkFooterRowDef","sticky: cdkFooterRowDefSticky"]}]}],t.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers},{type:void 0,decorators:[{type:a.Inject,args:[_]},{type:a.Optional}]}]},t}(p(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(E))),I=function(e){function t(t,r,o){var n=e.call(this,t,r)||this;return n._table=o,n}return u(t,e),t.decorators=[{type:a.Directive,args:[{selector:"[cdkRowDef]",inputs:["columns: cdkRowDefColumns","when: cdkRowDefWhen"]}]}],t.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers},{type:void 0,decorators:[{type:a.Inject,args:[_]},{type:a.Optional}]}]},t}(E),P=function(){function e(t){this._viewContainer=t,e.mostRecentCellOutlet=this}return e.prototype.ngOnDestroy=function(){e.mostRecentCellOutlet===this&&(e.mostRecentCellOutlet=null)},e.mostRecentCellOutlet=null,e.decorators=[{type:a.Directive,args:[{selector:"[cdkCellOutlet]"}]}],e.ctorParameters=function(){return[{type:a.ViewContainerRef}]},e}(),H=function(){function e(){}return e.decorators=[{type:a.Component,args:[{selector:"cdk-header-row, tr[cdk-header-row]",template:x,host:{class:"cdk-header-row",role:"row"},changeDetection:a.ChangeDetectionStrategy.Default,encapsulation:a.ViewEncapsulation.None}]}],e}(),j=function(){function e(){}return e.decorators=[{type:a.Component,args:[{selector:"cdk-footer-row, tr[cdk-footer-row]",template:x,host:{class:"cdk-footer-row",role:"row"},changeDetection:a.ChangeDetectionStrategy.Default,encapsulation:a.ViewEncapsulation.None}]}],e}(),F=function(){function e(){}return e.decorators=[{type:a.Component,args:[{selector:"cdk-row, tr[cdk-row]",template:x,host:{class:"cdk-row",role:"row"},changeDetection:a.ChangeDetectionStrategy.Default,encapsulation:a.ViewEncapsulation.None}]}],e}(),A=function(){function e(e){this.templateRef=e}return e.decorators=[{type:a.Directive,args:[{selector:"ng-template[cdkNoDataRow]"}]}],e.ctorParameters=function(){return[{type:a.TemplateRef}]},e}(),B=["top","bottom","left","right"],M=function(){function e(e,t,r,o,n){void 0===n&&(n=!0),this._isNativeHtmlTable=e,this._stickCellCss=t,this.direction=r,this._coalescedStyleScheduler=o,this._isBrowser=n}return e.prototype.clearStickyPositioning=function(e,t){var r,o,n=this,i=[];try{for(var a=f(e),s=a.next();!s.done;s=a.next()){var c=s.value;if(c.nodeType===c.ELEMENT_NODE){i.push(c);for(var l=0;l<c.children.length;l++)i.push(c.children[l])}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}this._coalescedStyleScheduler.schedule((function(){var e,r;try{for(var o=f(i),a=o.next();!a.done;a=o.next())n._removeStickyStyle(a.value,t)}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}))},e.prototype.updateStickyColumns=function(e,t,r){var o=this;if(e.length&&this._isBrowser&&(t.some((function(e){return e}))||r.some((function(e){return e})))){var n=e[0],i=n.children.length,a=this._getCellWidths(n),s=this._getStickyStartColumnPositions(a,t),c=this._getStickyEndColumnPositions(a,r);this._coalescedStyleScheduler.schedule((function(){var n,a,l="rtl"===o.direction,u=l?"right":"left",h=l?"left":"right";try{for(var d=f(e),p=d.next();!p.done;p=d.next())for(var y=p.value,_=0;_<i;_++){var w=y.children[_];t[_]&&o._addStickyStyle(w,u,s[_]),r[_]&&o._addStickyStyle(w,h,c[_])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}}))}},e.prototype.stickRows=function(e,t,r){var o=this;if(this._isBrowser){for(var n="bottom"===r?e.slice().reverse():e,i="bottom"===r?t.slice().reverse():t,a=[],s=[],c=0,l=0;c<n.length;c++)if(a[c]=l,i[c]){var u=n[c];s[c]=this._isNativeHtmlTable?Array.from(u.children):[u],c!==n.length-1&&(l+=u.getBoundingClientRect().height)}this._coalescedStyleScheduler.schedule((function(){for(var e,t,c=0;c<n.length;c++)if(i[c]){var l=a[c];try{for(var u=(e=void 0,f(s[c])),h=u.next();!h.done;h=u.next())o._addStickyStyle(h.value,r,l)}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}}}))}},e.prototype.updateStickyFooterContainer=function(e,t){var r=this;if(this._isNativeHtmlTable){var o=e.querySelector("tfoot");this._coalescedStyleScheduler.schedule((function(){t.some((function(e){return!e}))?r._removeStickyStyle(o,["bottom"]):r._addStickyStyle(o,"bottom",0)}))}},e.prototype._removeStickyStyle=function(e,t){var r,o;try{for(var n=f(t),i=n.next();!i.done;i=n.next())e.style[i.value]=""}catch(e){r={error:e}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(r)throw r.error}}e.style.zIndex=this._getCalculatedZIndex(e),B.some((function(t){return!!e.style[t]}))||(e.style.position="",e.classList.remove(this._stickCellCss))},e.prototype._addStickyStyle=function(e,t,r){e.classList.add(this._stickCellCss),e.style[t]=r+"px",e.style.cssText+="position: -webkit-sticky; position: sticky; ",e.style.zIndex=this._getCalculatedZIndex(e)},e.prototype._getCalculatedZIndex=function(e){var t,r,o={top:100,bottom:10,left:1,right:1},n=0;try{for(var i=f(B),a=i.next();!a.done;a=i.next()){var s=a.value;e.style[s]&&(n+=o[s])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n?""+n:""},e.prototype._getCellWidths=function(e){for(var t=[],r=e.children,o=0;o<r.length;o++)t.push(r[o].getBoundingClientRect().width);return t},e.prototype._getStickyStartColumnPositions=function(e,t){for(var r=[],o=0,n=0;n<e.length;n++)t[n]&&(r[n]=o,o+=e[n]);return r},e.prototype._getStickyEndColumnPositions=function(e,t){for(var r=[],o=0,n=e.length;n>0;n--)t[n]&&(r[n]=o,o+=e[n]);return r},e}();
|
|
22
|
+
*/var y,_,m,w=new a.InjectionToken("CDK_TABLE"),g=new a.InjectionToken("text-column-options");(y=function y(e){this.template=e}).decorators=[{type:a.Directive,args:[{selector:"[cdkCellDef]"}]}],y.ctorParameters=function(){return[{type:a.TemplateRef}]},(_=function _(e){this.template=e}).decorators=[{type:a.Directive,args:[{selector:"[cdkHeaderCellDef]"}]}],_.ctorParameters=function(){return[{type:a.TemplateRef}]},(m=function m(e){this.template=e}).decorators=[{type:a.Directive,args:[{selector:"[cdkFooterCellDef]"}]}],m.ctorParameters=function(){return[{type:a.TemplateRef}]};var D=function(e){function t(t){var r=e.call(this)||this;return r._table=t,r._stickyEnd=!1,r}return u(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stickyEnd",{get:function(){return this._stickyEnd},set:function(e){var t=this._stickyEnd;this._stickyEnd=r.coerceBooleanProperty(e),this._hasStickyChanged=t!==this._stickyEnd},enumerable:!1,configurable:!0}),t.prototype._updateColumnCssClassName=function(){this._columnCssClassName=["cdk-column-"+this.cssClassFriendlyName]},t}(p((function R(){})));D.decorators=[{type:a.Directive,args:[{selector:"[cdkColumnDef]",inputs:["sticky"],providers:[{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:D}]}]}],D.ctorParameters=function(){return[{type:void 0,decorators:[{type:a.Inject,args:[w]},{type:a.Optional}]}]},D.propDecorators={name:[{type:a.Input,args:["cdkColumnDef"]}],stickyEnd:[{type:a.Input,args:["stickyEnd"]}],cell:[{type:a.ContentChild,args:[y]}],headerCell:[{type:a.ContentChild,args:[_]}],footerCell:[{type:a.ContentChild,args:[m]}]};var v,C=function(e){function t(t,r){return e.call(this,t,r)||this}return u(t,e),t}(v=function v(e,t){var r,o,n=t.nativeElement.classList;try{for(var i=h(e._columnCssClassName),a=i.next();!a.done;a=i.next())n.add(a.value)}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}});C.decorators=[{type:a.Directive,args:[{selector:"cdk-header-cell, th[cdk-header-cell]",host:{class:"cdk-header-cell",role:"columnheader"}}]}],C.ctorParameters=function(){return[{type:D},{type:a.ElementRef}]};var k=function(e){function t(t,r){return e.call(this,t,r)||this}return u(t,e),t}(v);k.decorators=[{type:a.Directive,args:[{selector:"cdk-footer-cell, td[cdk-footer-cell]",host:{class:"cdk-footer-cell",role:"gridcell"}}]}],k.ctorParameters=function(){return[{type:D},{type:a.ElementRef}]};var S=function(e){function t(t,r){return e.call(this,t,r)||this}return u(t,e),t}(v);S.decorators=[{type:a.Directive,args:[{selector:"cdk-cell, td[cdk-cell]",host:{class:"cdk-cell",role:"gridcell"}}]}],S.ctorParameters=function(){return[{type:D},{type:a.ElementRef}]};var b=function b(){this.tasks=[],this.endTasks=[]},O=function(){function e(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new s.Subject}return e.prototype.schedule=function(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)},e.prototype.scheduleEnd=function(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)},e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},e.prototype._createScheduleIfNeeded=function(){var e=this;this._currentSchedule||(this._currentSchedule=new b,this._getScheduleObservable().pipe(c.takeUntil(this._destroyed)).subscribe((function(){for(var t,r,o,n;e._currentSchedule.tasks.length||e._currentSchedule.endTasks.length;){var i=e._currentSchedule;e._currentSchedule=new b;try{for(var a=(t=void 0,h(i.tasks)),s=a.next();!s.done;s=a.next())(0,s.value)()}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}try{for(var c=(o=void 0,h(i.endTasks)),l=c.next();!l.done;l=c.next())(0,l.value)()}catch(e){o={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(o)throw o.error}}}e._currentSchedule=null})))},e.prototype._getScheduleObservable=function(){return this._ngZone.isStable?s.from(Promise.resolve(void 0)):this._ngZone.onStable.pipe(c.take(1))},e}();O.decorators=[{type:a.Injectable}],O.ctorParameters=function(){return[{type:a.NgZone}]};var x="<ng-container cdkCellOutlet></ng-container>",E=function(){function e(e,t){this.template=e,this._differs=t}return e.prototype.ngOnChanges=function(e){if(!this._columnsDiffer){var t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}},e.prototype.getColumnsDiff=function(){return this._columnsDiffer.diff(this.columns)},e.prototype.extractCellTemplate=function(e){return this instanceof T?e.headerCell.template:this instanceof N?e.footerCell.template:e.cell.template},e}();E.decorators=[{type:a.Directive}],E.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers}]};var T=function(e){function t(t,r,o){var n=e.call(this,t,r)||this;return n._table=o,n}return u(t,e),t.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t)},t}(p(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(E)));T.decorators=[{type:a.Directive,args:[{selector:"[cdkHeaderRowDef]",inputs:["columns: cdkHeaderRowDef","sticky: cdkHeaderRowDefSticky"]}]}],T.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers},{type:void 0,decorators:[{type:a.Inject,args:[w]},{type:a.Optional}]}]};var N=function(e){function t(t,r,o){var n=e.call(this,t,r)||this;return n._table=o,n}return u(t,e),t.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t)},t}(p(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(E)));N.decorators=[{type:a.Directive,args:[{selector:"[cdkFooterRowDef]",inputs:["columns: cdkFooterRowDef","sticky: cdkFooterRowDefSticky"]}]}],N.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers},{type:void 0,decorators:[{type:a.Inject,args:[w]},{type:a.Optional}]}]};var P=function(e){function t(t,r,o){var n=e.call(this,t,r)||this;return n._table=o,n}return u(t,e),t}(E);P.decorators=[{type:a.Directive,args:[{selector:"[cdkRowDef]",inputs:["columns: cdkRowDefColumns","when: cdkRowDefWhen"]}]}],P.ctorParameters=function(){return[{type:a.TemplateRef},{type:a.IterableDiffers},{type:void 0,decorators:[{type:a.Inject,args:[w]},{type:a.Optional}]}]};var I,H,j,F,A=function(){function e(t){this._viewContainer=t,e.mostRecentCellOutlet=this}return e.prototype.ngOnDestroy=function(){e.mostRecentCellOutlet===this&&(e.mostRecentCellOutlet=null)},e}();A.mostRecentCellOutlet=null,A.decorators=[{type:a.Directive,args:[{selector:"[cdkCellOutlet]"}]}],A.ctorParameters=function(){return[{type:a.ViewContainerRef}]},(I=function I(){}).decorators=[{type:a.Component,args:[{selector:"cdk-header-row, tr[cdk-header-row]",template:x,host:{class:"cdk-header-row",role:"row"},changeDetection:a.ChangeDetectionStrategy.Default,encapsulation:a.ViewEncapsulation.None}]}],(H=function H(){}).decorators=[{type:a.Component,args:[{selector:"cdk-footer-row, tr[cdk-footer-row]",template:x,host:{class:"cdk-footer-row",role:"row"},changeDetection:a.ChangeDetectionStrategy.Default,encapsulation:a.ViewEncapsulation.None}]}],(j=function j(){}).decorators=[{type:a.Component,args:[{selector:"cdk-row, tr[cdk-row]",template:x,host:{class:"cdk-row",role:"row"},changeDetection:a.ChangeDetectionStrategy.Default,encapsulation:a.ViewEncapsulation.None}]}],(F=function F(e){this.templateRef=e}).decorators=[{type:a.Directive,args:[{selector:"ng-template[cdkNoDataRow]"}]}],F.ctorParameters=function(){return[{type:a.TemplateRef}]};
|
|
31
23
|
/**
|
|
32
24
|
* @license
|
|
33
25
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -35,7 +27,7 @@ function p(e){return function(e){function t(){for(var t=[],r=0;r<arguments.lengt
|
|
|
35
27
|
* Use of this source code is governed by an MIT-style license that can be
|
|
36
28
|
* found in the LICENSE file at https://angular.io/license
|
|
37
29
|
*/
|
|
38
|
-
|
|
30
|
+
var B,M,V,L,q=["top","bottom","left","right"],U=function(){function e(e,t,r,o,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0),this._isNativeHtmlTable=e,this._stickCellCss=t,this.direction=r,this._coalescedStyleScheduler=o,this._isBrowser=n,this._needsPositionStickyOnElement=i}return e.prototype.clearStickyPositioning=function(e,t){var r,o,n=this,i=[];try{for(var a=h(e),s=a.next();!s.done;s=a.next()){var c=s.value;if(c.nodeType===c.ELEMENT_NODE){i.push(c);for(var l=0;l<c.children.length;l++)i.push(c.children[l])}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}this._coalescedStyleScheduler.schedule((function(){var e,r;try{for(var o=h(i),a=o.next();!a.done;a=o.next())n._removeStickyStyle(a.value,t)}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}))},e.prototype.updateStickyColumns=function(e,t,r){var o=this;if(e.length&&this._isBrowser&&(t.some((function(e){return e}))||r.some((function(e){return e})))){var n=e[0],i=n.children.length,a=this._getCellWidths(n),s=this._getStickyStartColumnPositions(a,t),c=this._getStickyEndColumnPositions(a,r);this._coalescedStyleScheduler.schedule((function(){var n,a,l="rtl"===o.direction,u=l?"right":"left",d=l?"left":"right";try{for(var f=h(e),p=f.next();!p.done;p=f.next())for(var y=p.value,_=0;_<i;_++){var m=y.children[_];t[_]&&o._addStickyStyle(m,u,s[_]),r[_]&&o._addStickyStyle(m,d,c[_])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}}))}},e.prototype.stickRows=function(e,t,r){var o=this;if(this._isBrowser){for(var n="bottom"===r?e.slice().reverse():e,i="bottom"===r?t.slice().reverse():t,a=[],s=[],c=0,l=0;c<n.length;c++)if(a[c]=l,i[c]){var u=n[c];s[c]=this._isNativeHtmlTable?Array.from(u.children):[u],c!==n.length-1&&(l+=u.getBoundingClientRect().height)}this._coalescedStyleScheduler.schedule((function(){for(var e,t,c=0;c<n.length;c++)if(i[c]){var l=a[c];try{for(var u=(e=void 0,h(s[c])),d=u.next();!d.done;d=u.next())o._addStickyStyle(d.value,r,l)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}}}))}},e.prototype.updateStickyFooterContainer=function(e,t){var r=this;if(this._isNativeHtmlTable){var o=e.querySelector("tfoot");this._coalescedStyleScheduler.schedule((function(){t.some((function(e){return!e}))?r._removeStickyStyle(o,["bottom"]):r._addStickyStyle(o,"bottom",0)}))}},e.prototype._removeStickyStyle=function(e,t){var r,o;try{for(var n=h(t),i=n.next();!i.done;i=n.next())e.style[i.value]=""}catch(e){r={error:e}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(r)throw r.error}}q.some((function(r){return-1===t.indexOf(r)&&e.style[r]}))?e.style.zIndex=this._getCalculatedZIndex(e):(e.style.zIndex="",this._needsPositionStickyOnElement&&(e.style.position=""),e.classList.remove(this._stickCellCss))},e.prototype._addStickyStyle=function(e,t,r){e.classList.add(this._stickCellCss),e.style[t]=r+"px",e.style.zIndex=this._getCalculatedZIndex(e),this._needsPositionStickyOnElement&&(e.style.cssText+="position: -webkit-sticky; position: sticky; ")},e.prototype._getCalculatedZIndex=function(e){var t,r,o={top:100,bottom:10,left:1,right:1},n=0;try{for(var i=h(q),a=i.next();!a.done;a=i.next()){var s=a.value;e.style[s]&&(n+=o[s])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n?""+n:""},e.prototype._getCellWidths=function(e){for(var t=[],r=e.children,o=0;o<r.length;o++)t.push(r[o].getBoundingClientRect().width);return t},e.prototype._getStickyStartColumnPositions=function(e,t){for(var r=[],o=0,n=0;n<e.length;n++)t[n]&&(r[n]=o,o+=e[n]);return r},e.prototype._getStickyEndColumnPositions=function(e,t){for(var r=[],o=0,n=e.length;n>0;n--)t[n]&&(r[n]=o,o+=e[n]);return r},e}();
|
|
39
31
|
/**
|
|
40
32
|
* @license
|
|
41
33
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -43,14 +35,14 @@ function V(e){return Error('Could not find column with id "'+e+'".')}
|
|
|
43
35
|
* Use of this source code is governed by an MIT-style license that can be
|
|
44
36
|
* found in the LICENSE file at https://angular.io/license
|
|
45
37
|
*/
|
|
46
|
-
var L,q=function(){function e(e,t){this.viewContainer=e,this.elementRef=t}return e.decorators=[{type:a.Directive,args:[{selector:"[rowOutlet]"}]}],e.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},e}(),U=function(){function e(e,t){this.viewContainer=e,this.elementRef=t}return e.decorators=[{type:a.Directive,args:[{selector:"[headerRowOutlet]"}]}],e.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},e}(),Z=function(){function e(e,t){this.viewContainer=e,this.elementRef=t}return e.decorators=[{type:a.Directive,args:[{selector:"[footerRowOutlet]"}]}],e.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},e}(),K=function(){function e(e,t){this.viewContainer=e,this.elementRef=t}return e.decorators=[{type:a.Directive,args:[{selector:"[noDataRowOutlet]"}]}],e.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},e}(),W='\n <ng-content select="caption"></ng-content>\n <ng-content select="colgroup, col"></ng-content>\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container noDataRowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>\n',z=(u((function J(){return null!==L&&L.apply(this,arguments)||this}),L=a.EmbeddedViewRef),function(){function e(e,t,r,o,n,i,a,c){this._differs=e,this._changeDetectorRef=t,this._coalescedStyleScheduler=r,this._elementRef=o,this._dir=i,this._platform=c,this._onDestroy=new s.Subject,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new s.BehaviorSubject({start:0,end:Number.MAX_VALUE}),n||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=a,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return Object.defineProperty(e.prototype,"trackBy",{get:function(){return this._trackByFn},set:function(e){a.isDevMode()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(e)+"."),this._trackByFn=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},set:function(e){this._dataSource!==e&&this._switchDataSource(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiTemplateDataRows",{get:function(){return this._multiTemplateDataRows},set:function(e){this._multiTemplateDataRows=r.coerceBooleanProperty(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((function(t,r){return e.trackBy?e.trackBy(r.dataIndex,r.data):r}))},e.prototype.ngAfterContentChecked=function(){if(this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&!this._rowDefs.length)throw function e(){return Error("Missing definitions for header, footer, and row; cannot determine which columns should be rendered.")}();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()},e.prototype.ngOnDestroy=function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),o.isDataSource(this.dataSource)&&this.dataSource.disconnect(this)},e.prototype.renderRows=function(){var e=this;this._renderRows=this._getAllRenderRows();var t=this._dataDiffer.diff(this._renderRows);if(t){var r=this._rowOutlet.viewContainer;t.forEachOperation((function(t,o,n){if(null==t.previousIndex)e._insertRow(t.item,n);else if(null==n)r.remove(o);else{var i=r.get(o);r.move(i,n)}})),this._updateRowIndexContext(),t.forEachIdentityChange((function(e){r.get(e.currentIndex).context.$implicit=e.item.data})),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()},e.prototype.addColumnDef=function(e){this._customColumnDefs.add(e)},e.prototype.removeColumnDef=function(e){this._customColumnDefs.delete(e)},e.prototype.addRowDef=function(e){this._customRowDefs.add(e)},e.prototype.removeRowDef=function(e){this._customRowDefs.delete(e)},e.prototype.addHeaderRowDef=function(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0},e.prototype.removeHeaderRowDef=function(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0},e.prototype.addFooterRowDef=function(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0},e.prototype.removeFooterRowDef=function(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0},e.prototype.updateStickyHeaderRowStyles=function(){var e=this._getRenderedRows(this._headerRowOutlet),t=this._elementRef.nativeElement.querySelector("thead");t&&(t.style.display=e.length?"":"none");var r=this._headerRowDefs.map((function(e){return e.sticky}));this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,r,"top"),this._headerRowDefs.forEach((function(e){return e.resetStickyChanged()}))},e.prototype.updateStickyFooterRowStyles=function(){var e=this._getRenderedRows(this._footerRowOutlet),t=this._elementRef.nativeElement.querySelector("tfoot");t&&(t.style.display=e.length?"":"none");var r=this._footerRowDefs.map((function(e){return e.sticky}));this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,r,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,r),this._footerRowDefs.forEach((function(e){return e.resetStickyChanged()}))},e.prototype.updateStickyColumnStyles=function(){var e=this,t=this._getRenderedRows(this._headerRowOutlet),r=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning(d(t,r,o),["left","right"]),t.forEach((function(t,r){e._addStickyColumnStyles([t],e._headerRowDefs[r])})),this._rowDefs.forEach((function(t){for(var o=[],n=0;n<r.length;n++)e._renderRows[n].rowDef===t&&o.push(r[n]);e._addStickyColumnStyles(o,t)})),o.forEach((function(t,r){e._addStickyColumnStyles([t],e._footerRowDefs[r])})),Array.from(this._columnDefsByName.values()).forEach((function(e){return e.resetStickyChanged()}))},e.prototype._getAllRenderRows=function(){var e=[],t=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(var r=0;r<this._data.length;r++){var o=this._data[r],n=this._getRenderRowsForData(o,r,t.get(o));this._cachedRenderRowsMap.has(o)||this._cachedRenderRowsMap.set(o,new WeakMap);for(var i=0;i<n.length;i++){var a=n[i],s=this._cachedRenderRowsMap.get(a.data);s.has(a.rowDef)?s.get(a.rowDef).push(a):s.set(a.rowDef,[a]),e.push(a)}}return e},e.prototype._getRenderRowsForData=function(e,t,r){return this._getRowDefs(e,t).map((function(o){var n=r&&r.has(o)?r.get(o):[];if(n.length){var i=n.shift();return i.dataIndex=t,i}return{data:e,rowDef:o,dataIndex:t}}))},e.prototype._cacheColumnDefs=function(){var e=this;this._columnDefsByName.clear(),X(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach((function(t){if(e._columnDefsByName.has(t.name))throw function r(e){return Error('Duplicate column definition name provided: "'+e+'".')}(t.name);e._columnDefsByName.set(t.name,t)}))},e.prototype._cacheRowDefs=function(){this._headerRowDefs=X(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=X(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=X(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);var e=this._rowDefs.filter((function(e){return!e.when}));if(!this.multiTemplateDataRows&&e.length>1)throw function t(){return Error("There can only be one default row without a when predicate function.")}();this._defaultRowDef=e[0]},e.prototype._renderUpdatedColumns=function(){var e=function(e,t){return e||!!t.getColumnsDiff()},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();var r=this._headerRowDefs.reduce(e,!1);r&&this._forceRenderHeaderRows();var o=this._footerRowDefs.reduce(e,!1);return o&&this._forceRenderFooterRows(),t||r||o},e.prototype._switchDataSource=function(e){this._data=[],o.isDataSource(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e},e.prototype._observeRenderChanges=function(){var e=this;if(this.dataSource){var t;if(o.isDataSource(this.dataSource)?t=this.dataSource.connect(this):s.isObservable(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=s.of(this.dataSource)),void 0===t)throw function r(){return Error("Provided data source did not match an array, Observable, or DataSource")}();this._renderChangeSubscription=t.pipe(c.takeUntil(this._onDestroy)).subscribe((function(t){e._data=t||[],e.renderRows()}))}},e.prototype._forceRenderHeaderRows=function(){var e=this;this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((function(t,r){return e._renderRow(e._headerRowOutlet,t,r)})),this.updateStickyHeaderRowStyles()},e.prototype._forceRenderFooterRows=function(){var e=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((function(t,r){return e._renderRow(e._footerRowOutlet,t,r)})),this.updateStickyFooterRowStyles()},e.prototype._addStickyColumnStyles=function(e,t){var r=this,o=Array.from(t.columns||[]).map((function(e){var t=r._columnDefsByName.get(e);if(!t)throw V(e);return t})),n=o.map((function(e){return e.sticky})),i=o.map((function(e){return e.stickyEnd}));this._stickyStyler.updateStickyColumns(e,n,i)},e.prototype._getRenderedRows=function(e){for(var t=[],r=0;r<e.viewContainer.length;r++){var o=e.viewContainer.get(r);t.push(o.rootNodes[0])}return t},e.prototype._getRowDefs=function(e,t){if(1==this._rowDefs.length)return[this._rowDefs[0]];var r=[];if(this.multiTemplateDataRows)r=this._rowDefs.filter((function(r){return!r.when||r.when(t,e)}));else{var o=this._rowDefs.find((function(r){return r.when&&r.when(t,e)}))||this._defaultRowDef;o&&r.push(o)}if(!r.length)throw function n(e){return Error("Could not find a matching row definition for theprovided row data: "+JSON.stringify(e))}(e);return r},e.prototype._insertRow=function(e,t){this._renderRow(this._rowOutlet,e.rowDef,t,{$implicit:e.data})},e.prototype._renderRow=function(e,t,r,o){var n,i;void 0===o&&(o={}),e.viewContainer.createEmbeddedView(t.template,o,r);try{for(var a=f(this._getCellTemplates(t)),s=a.next();!s.done;s=a.next())P.mostRecentCellOutlet&&P.mostRecentCellOutlet._viewContainer.createEmbeddedView(s.value,o)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this._changeDetectorRef.markForCheck()},e.prototype._updateRowIndexContext=function(){for(var e=this._rowOutlet.viewContainer,t=0,r=e.length;t<r;t++){var o=e.get(t).context;o.count=r,o.first=0===t,o.last=t===r-1,o.even=t%2==0,o.odd=!o.even,this.multiTemplateDataRows?(o.dataIndex=this._renderRows[t].dataIndex,o.renderIndex=t):o.index=this._renderRows[t].dataIndex}},e.prototype._getCellTemplates=function(e){var t=this;return e&&e.columns?Array.from(e.columns,(function(r){var o=t._columnDefsByName.get(r);if(!o)throw V(r);return e.extractCellTemplate(o)})):[]},e.prototype._applyNativeTableSections=function(){var e,t,r,o,n=this._document.createDocumentFragment(),i=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];try{for(var a=f(i),s=a.next();!s.done;s=a.next()){var c=s.value,l=this._document.createElement(c.tag);l.setAttribute("role","rowgroup");try{for(var u=(r=void 0,f(c.outlets)),h=u.next();!h.done;h=u.next())l.appendChild(h.value.elementRef.nativeElement)}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}n.appendChild(l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}this._elementRef.nativeElement.appendChild(n)},e.prototype._forceRenderDataRows=function(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()},e.prototype._checkStickyStates=function(){var e=function(e,t){return e||t.hasStickyChanged()};this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&this.updateStickyColumnStyles()},e.prototype._setupStickyStyler=function(){var e=this;this._stickyStyler=new M(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser),(this._dir?this._dir.change:s.of()).pipe(c.takeUntil(this._onDestroy)).subscribe((function(t){e._stickyStyler.direction=t,e.updateStickyColumnStyles()}))},e.prototype._getOwnDefs=function(e){var t=this;return e.filter((function(e){return!e._table||e._table===t}))},e.prototype._updateNoDataRow=function(){if(this._noDataRow){var e=0===this._rowOutlet.viewContainer.length;if(e!==this._isShowingNoDataRow){var t=this._noDataRowOutlet.viewContainer;e?t.createEmbeddedView(this._noDataRow.templateRef):t.clear(),this._isShowingNoDataRow=e}}},e.decorators=[{type:a.Component,args:[{selector:"cdk-table, table[cdk-table]",exportAs:"cdkTable",template:W,host:{class:"cdk-table"},encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.Default,providers:[{provide:_,useExisting:e},O]}]}],e.ctorParameters=function(){return[{type:a.IterableDiffers},{type:a.ChangeDetectorRef},{type:O},{type:a.ElementRef},{type:String,decorators:[{type:a.Attribute,args:["role"]}]},{type:t.Directionality,decorators:[{type:a.Optional}]},{type:void 0,decorators:[{type:a.Inject,args:[i.DOCUMENT]}]},{type:n.Platform}]},e.propDecorators={trackBy:[{type:a.Input}],dataSource:[{type:a.Input}],multiTemplateDataRows:[{type:a.Input}],_rowOutlet:[{type:a.ViewChild,args:[q,{static:!0}]}],_headerRowOutlet:[{type:a.ViewChild,args:[U,{static:!0}]}],_footerRowOutlet:[{type:a.ViewChild,args:[Z,{static:!0}]}],_noDataRowOutlet:[{type:a.ViewChild,args:[K,{static:!0}]}],_contentColumnDefs:[{type:a.ContentChildren,args:[R,{descendants:!0}]}],_contentRowDefs:[{type:a.ContentChildren,args:[I,{descendants:!0}]}],_contentHeaderRowDefs:[{type:a.ContentChildren,args:[T,{descendants:!0}]}],_contentFooterRowDefs:[{type:a.ContentChildren,args:[N,{descendants:!0}]}],_noDataRow:[{type:a.ContentChild,args:[A]}]},e}());function X(e,t){return e.concat(Array.from(t))}
|
|
38
|
+
function Z(e){return Error('Could not find column with id "'+e+'".')}(B=function B(e,t){this.viewContainer=e,this.elementRef=t}).decorators=[{type:a.Directive,args:[{selector:"[rowOutlet]"}]}],B.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},(M=function M(e,t){this.viewContainer=e,this.elementRef=t}).decorators=[{type:a.Directive,args:[{selector:"[headerRowOutlet]"}]}],M.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},(V=function V(e,t){this.viewContainer=e,this.elementRef=t}).decorators=[{type:a.Directive,args:[{selector:"[footerRowOutlet]"}]}],V.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]},(L=function L(e,t){this.viewContainer=e,this.elementRef=t}).decorators=[{type:a.Directive,args:[{selector:"[noDataRowOutlet]"}]}],L.ctorParameters=function(){return[{type:a.ViewContainerRef},{type:a.ElementRef}]};var K,W='\n <ng-content select="caption"></ng-content>\n <ng-content select="colgroup, col"></ng-content>\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container noDataRowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>\n',z=(u((function J(){return null!==K&&K.apply(this,arguments)||this}),K=a.EmbeddedViewRef),function(){function e(e,t,r,o,n,i,a,c){this._differs=e,this._changeDetectorRef=t,this._coalescedStyleScheduler=r,this._elementRef=o,this._dir=i,this._platform=c,this._onDestroy=new s.Subject,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new s.BehaviorSubject({start:0,end:Number.MAX_VALUE}),n||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=a,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return Object.defineProperty(e.prototype,"trackBy",{get:function(){return this._trackByFn},set:function(e){a.isDevMode()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(e)+"."),this._trackByFn=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},set:function(e){this._dataSource!==e&&this._switchDataSource(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiTemplateDataRows",{get:function(){return this._multiTemplateDataRows},set:function(e){this._multiTemplateDataRows=r.coerceBooleanProperty(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((function(t,r){return e.trackBy?e.trackBy(r.dataIndex,r.data):r}))},e.prototype.ngAfterContentChecked=function(){if(this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&!this._rowDefs.length)throw function e(){return Error("Missing definitions for header, footer, and row; cannot determine which columns should be rendered.")}();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()},e.prototype.ngOnDestroy=function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),o.isDataSource(this.dataSource)&&this.dataSource.disconnect(this)},e.prototype.renderRows=function(){var e=this;this._renderRows=this._getAllRenderRows();var t=this._dataDiffer.diff(this._renderRows);if(t){var r=this._rowOutlet.viewContainer;t.forEachOperation((function(t,o,n){if(null==t.previousIndex)e._insertRow(t.item,n);else if(null==n)r.remove(o);else{var i=r.get(o);r.move(i,n)}})),this._updateRowIndexContext(),t.forEachIdentityChange((function(e){r.get(e.currentIndex).context.$implicit=e.item.data})),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()},e.prototype.addColumnDef=function(e){this._customColumnDefs.add(e)},e.prototype.removeColumnDef=function(e){this._customColumnDefs.delete(e)},e.prototype.addRowDef=function(e){this._customRowDefs.add(e)},e.prototype.removeRowDef=function(e){this._customRowDefs.delete(e)},e.prototype.addHeaderRowDef=function(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0},e.prototype.removeHeaderRowDef=function(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0},e.prototype.addFooterRowDef=function(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0},e.prototype.removeFooterRowDef=function(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0},e.prototype.updateStickyHeaderRowStyles=function(){var e=this._getRenderedRows(this._headerRowOutlet),t=this._elementRef.nativeElement.querySelector("thead");t&&(t.style.display=e.length?"":"none");var r=this._headerRowDefs.map((function(e){return e.sticky}));this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,r,"top"),this._headerRowDefs.forEach((function(e){return e.resetStickyChanged()}))},e.prototype.updateStickyFooterRowStyles=function(){var e=this._getRenderedRows(this._footerRowOutlet),t=this._elementRef.nativeElement.querySelector("tfoot");t&&(t.style.display=e.length?"":"none");var r=this._footerRowDefs.map((function(e){return e.sticky}));this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,r,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,r),this._footerRowDefs.forEach((function(e){return e.resetStickyChanged()}))},e.prototype.updateStickyColumnStyles=function(){var e=this,t=this._getRenderedRows(this._headerRowOutlet),r=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning(f(t,r,o),["left","right"]),t.forEach((function(t,r){e._addStickyColumnStyles([t],e._headerRowDefs[r])})),this._rowDefs.forEach((function(t){for(var o=[],n=0;n<r.length;n++)e._renderRows[n].rowDef===t&&o.push(r[n]);e._addStickyColumnStyles(o,t)})),o.forEach((function(t,r){e._addStickyColumnStyles([t],e._footerRowDefs[r])})),Array.from(this._columnDefsByName.values()).forEach((function(e){return e.resetStickyChanged()}))},e.prototype._getAllRenderRows=function(){var e=[],t=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(var r=0;r<this._data.length;r++){var o=this._data[r],n=this._getRenderRowsForData(o,r,t.get(o));this._cachedRenderRowsMap.has(o)||this._cachedRenderRowsMap.set(o,new WeakMap);for(var i=0;i<n.length;i++){var a=n[i],s=this._cachedRenderRowsMap.get(a.data);s.has(a.rowDef)?s.get(a.rowDef).push(a):s.set(a.rowDef,[a]),e.push(a)}}return e},e.prototype._getRenderRowsForData=function(e,t,r){return this._getRowDefs(e,t).map((function(o){var n=r&&r.has(o)?r.get(o):[];if(n.length){var i=n.shift();return i.dataIndex=t,i}return{data:e,rowDef:o,dataIndex:t}}))},e.prototype._cacheColumnDefs=function(){var e=this;this._columnDefsByName.clear(),X(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach((function(t){if(e._columnDefsByName.has(t.name))throw function r(e){return Error('Duplicate column definition name provided: "'+e+'".')}(t.name);e._columnDefsByName.set(t.name,t)}))},e.prototype._cacheRowDefs=function(){this._headerRowDefs=X(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=X(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=X(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);var e=this._rowDefs.filter((function(e){return!e.when}));if(!this.multiTemplateDataRows&&e.length>1)throw function t(){return Error("There can only be one default row without a when predicate function.")}();this._defaultRowDef=e[0]},e.prototype._renderUpdatedColumns=function(){var e=function(e,t){return e||!!t.getColumnsDiff()},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();var r=this._headerRowDefs.reduce(e,!1);r&&this._forceRenderHeaderRows();var o=this._footerRowDefs.reduce(e,!1);return o&&this._forceRenderFooterRows(),t||r||o},e.prototype._switchDataSource=function(e){this._data=[],o.isDataSource(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e},e.prototype._observeRenderChanges=function(){var e=this;if(this.dataSource){var t;if(o.isDataSource(this.dataSource)?t=this.dataSource.connect(this):s.isObservable(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=s.of(this.dataSource)),void 0===t)throw function r(){return Error("Provided data source did not match an array, Observable, or DataSource")}();this._renderChangeSubscription=t.pipe(c.takeUntil(this._onDestroy)).subscribe((function(t){e._data=t||[],e.renderRows()}))}},e.prototype._forceRenderHeaderRows=function(){var e=this;this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((function(t,r){return e._renderRow(e._headerRowOutlet,t,r)})),this.updateStickyHeaderRowStyles()},e.prototype._forceRenderFooterRows=function(){var e=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((function(t,r){return e._renderRow(e._footerRowOutlet,t,r)})),this.updateStickyFooterRowStyles()},e.prototype._addStickyColumnStyles=function(e,t){var r=this,o=Array.from(t.columns||[]).map((function(e){var t=r._columnDefsByName.get(e);if(!t)throw Z(e);return t})),n=o.map((function(e){return e.sticky})),i=o.map((function(e){return e.stickyEnd}));this._stickyStyler.updateStickyColumns(e,n,i)},e.prototype._getRenderedRows=function(e){for(var t=[],r=0;r<e.viewContainer.length;r++){var o=e.viewContainer.get(r);t.push(o.rootNodes[0])}return t},e.prototype._getRowDefs=function(e,t){if(1==this._rowDefs.length)return[this._rowDefs[0]];var r=[];if(this.multiTemplateDataRows)r=this._rowDefs.filter((function(r){return!r.when||r.when(t,e)}));else{var o=this._rowDefs.find((function(r){return r.when&&r.when(t,e)}))||this._defaultRowDef;o&&r.push(o)}if(!r.length)throw function n(e){return Error("Could not find a matching row definition for theprovided row data: "+JSON.stringify(e))}(e);return r},e.prototype._insertRow=function(e,t){this._renderRow(this._rowOutlet,e.rowDef,t,{$implicit:e.data})},e.prototype._renderRow=function(e,t,r,o){var n,i;void 0===o&&(o={}),e.viewContainer.createEmbeddedView(t.template,o,r);try{for(var a=h(this._getCellTemplates(t)),s=a.next();!s.done;s=a.next())A.mostRecentCellOutlet&&A.mostRecentCellOutlet._viewContainer.createEmbeddedView(s.value,o)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this._changeDetectorRef.markForCheck()},e.prototype._updateRowIndexContext=function(){for(var e=this._rowOutlet.viewContainer,t=0,r=e.length;t<r;t++){var o=e.get(t).context;o.count=r,o.first=0===t,o.last=t===r-1,o.even=t%2==0,o.odd=!o.even,this.multiTemplateDataRows?(o.dataIndex=this._renderRows[t].dataIndex,o.renderIndex=t):o.index=this._renderRows[t].dataIndex}},e.prototype._getCellTemplates=function(e){var t=this;return e&&e.columns?Array.from(e.columns,(function(r){var o=t._columnDefsByName.get(r);if(!o)throw Z(r);return e.extractCellTemplate(o)})):[]},e.prototype._applyNativeTableSections=function(){var e,t,r,o,n=this._document.createDocumentFragment(),i=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];try{for(var a=h(i),s=a.next();!s.done;s=a.next()){var c=s.value,l=this._document.createElement(c.tag);l.setAttribute("role","rowgroup");try{for(var u=(r=void 0,h(c.outlets)),d=u.next();!d.done;d=u.next())l.appendChild(d.value.elementRef.nativeElement)}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}n.appendChild(l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}this._elementRef.nativeElement.appendChild(n)},e.prototype._forceRenderDataRows=function(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()},e.prototype._checkStickyStates=function(){var e=function(e,t){return e||t.hasStickyChanged()};this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&this.updateStickyColumnStyles()},e.prototype._setupStickyStyler=function(){var e=this;this._stickyStyler=new U(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement),(this._dir?this._dir.change:s.of()).pipe(c.takeUntil(this._onDestroy)).subscribe((function(t){e._stickyStyler.direction=t,e.updateStickyColumnStyles()}))},e.prototype._getOwnDefs=function(e){var t=this;return e.filter((function(e){return!e._table||e._table===t}))},e.prototype._updateNoDataRow=function(){if(this._noDataRow){var e=0===this._rowOutlet.viewContainer.length;if(e!==this._isShowingNoDataRow){var t=this._noDataRowOutlet.viewContainer;e?t.createEmbeddedView(this._noDataRow.templateRef):t.clear(),this._isShowingNoDataRow=e}}},e}());function X(e,t){return e.concat(Array.from(t))}
|
|
47
39
|
/**
|
|
48
40
|
* @license
|
|
49
41
|
* Copyright Google LLC All Rights Reserved.
|
|
50
42
|
*
|
|
51
43
|
* Use of this source code is governed by an MIT-style license that can be
|
|
52
44
|
* found in the LICENSE file at https://angular.io/license
|
|
53
|
-
*/var $=function(){function e(e,t){this._table=e,this._options=t,this.justify="start",this._options=t||{}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this._syncColumnDefName()},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){if(this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||function(e,t){return e[t]}),!this._table)throw function e(){return Error("Text column could not find a parent table for registration.")}();this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef)},e.prototype.ngOnDestroy=function(){this._table&&this._table.removeColumnDef(this.columnDef)},e.prototype._createDefaultHeaderText=function(){var e=this.name;if(a.isDevMode()&&!e)throw function t(){return Error("Table text column must have a name.")}();return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(e):e[0].toUpperCase()+e.slice(1)},e.prototype._syncColumnDefName=function(){this.columnDef&&(this.columnDef.name=this.name)},e
|
|
45
|
+
*/z.decorators=[{type:a.Component,args:[{selector:"cdk-table, table[cdk-table]",exportAs:"cdkTable",template:W,host:{class:"cdk-table"},encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.Default,providers:[{provide:w,useExisting:z},O]}]}],z.ctorParameters=function(){return[{type:a.IterableDiffers},{type:a.ChangeDetectorRef},{type:O},{type:a.ElementRef},{type:String,decorators:[{type:a.Attribute,args:["role"]}]},{type:t.Directionality,decorators:[{type:a.Optional}]},{type:void 0,decorators:[{type:a.Inject,args:[i.DOCUMENT]}]},{type:n.Platform}]},z.propDecorators={trackBy:[{type:a.Input}],dataSource:[{type:a.Input}],multiTemplateDataRows:[{type:a.Input}],_rowOutlet:[{type:a.ViewChild,args:[B,{static:!0}]}],_headerRowOutlet:[{type:a.ViewChild,args:[M,{static:!0}]}],_footerRowOutlet:[{type:a.ViewChild,args:[V,{static:!0}]}],_noDataRowOutlet:[{type:a.ViewChild,args:[L,{static:!0}]}],_contentColumnDefs:[{type:a.ContentChildren,args:[D,{descendants:!0}]}],_contentRowDefs:[{type:a.ContentChildren,args:[P,{descendants:!0}]}],_contentHeaderRowDefs:[{type:a.ContentChildren,args:[T,{descendants:!0}]}],_contentFooterRowDefs:[{type:a.ContentChildren,args:[N,{descendants:!0}]}],_noDataRow:[{type:a.ContentChild,args:[F]}]};var $=function(){function e(e,t){this._table=e,this._options=t,this.justify="start",this._options=t||{}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this._syncColumnDefName()},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){if(this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||function(e,t){return e[t]}),!this._table)throw function e(){return Error("Text column could not find a parent table for registration.")}();this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef)},e.prototype.ngOnDestroy=function(){this._table&&this._table.removeColumnDef(this.columnDef)},e.prototype._createDefaultHeaderText=function(){var e=this.name;if(a.isDevMode()&&!e)throw function t(){return Error("Table text column must have a name.")}();return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(e):e[0].toUpperCase()+e.slice(1)},e.prototype._syncColumnDefName=function(){this.columnDef&&(this.columnDef.name=this.name)},e}();$.decorators=[{type:a.Component,args:[{selector:"cdk-text-column",template:'\n <ng-container cdkColumnDef>\n <th cdk-header-cell *cdkHeaderCellDef [style.text-align]="justify">\n {{headerText}}\n </th>\n <td cdk-cell *cdkCellDef="let data" [style.text-align]="justify">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n ',encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.Default}]}],$.ctorParameters=function(){return[{type:z,decorators:[{type:a.Optional}]},{type:void 0,decorators:[{type:a.Optional},{type:a.Inject,args:[g]}]}]},$.propDecorators={name:[{type:a.Input}],headerText:[{type:a.Input}],dataAccessor:[{type:a.Input}],justify:[{type:a.Input}],columnDef:[{type:a.ViewChild,args:[D,{static:!0}]}],cell:[{type:a.ViewChild,args:[y,{static:!0}]}],headerCell:[{type:a.ViewChild,args:[_,{static:!0}]}]};
|
|
54
46
|
/**
|
|
55
47
|
* @license
|
|
56
48
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -58,6 +50,7 @@ var L,q=function(){function e(e,t){this.viewContainer=e,this.elementRef=t}return
|
|
|
58
50
|
* Use of this source code is governed by an MIT-style license that can be
|
|
59
51
|
* found in the LICENSE file at https://angular.io/license
|
|
60
52
|
*/
|
|
53
|
+
var Y,G=[z,P,y,A,_,m,D,S,j,C,k,I,T,H,N,B,M,V,$,F,L];(Y=function Y(){}).decorators=[{type:a.NgModule,args:[{exports:G,declarations:G}]}],
|
|
61
54
|
/**
|
|
62
55
|
* @license
|
|
63
56
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -65,4 +58,4 @@ var L,q=function(){function e(e,t){this.viewContainer=e,this.elementRef=t}return
|
|
|
65
58
|
* Use of this source code is governed by an MIT-style license that can be
|
|
66
59
|
* found in the LICENSE file at https://angular.io/license
|
|
67
60
|
*/
|
|
68
|
-
Object.defineProperty(e,"DataSource",{enumerable:!0,get:function(){return o.DataSource}}),e.BaseCdkCell=
|
|
61
|
+
Object.defineProperty(e,"DataSource",{enumerable:!0,get:function(){return o.DataSource}}),e.BaseCdkCell=v,e.BaseRowDef=E,e.CDK_ROW_TEMPLATE=x,e.CDK_TABLE=w,e.CDK_TABLE_TEMPLATE=W,e.CdkCell=S,e.CdkCellDef=y,e.CdkCellOutlet=A,e.CdkColumnDef=D,e.CdkFooterCell=k,e.CdkFooterCellDef=m,e.CdkFooterRow=H,e.CdkFooterRowDef=N,e.CdkHeaderCell=C,e.CdkHeaderCellDef=_,e.CdkHeaderRow=I,e.CdkHeaderRowDef=T,e.CdkNoDataRow=F,e.CdkRow=j,e.CdkRowDef=P,e.CdkTable=z,e.CdkTableModule=Y,e.CdkTextColumn=$,e.DataRowOutlet=B,e.FooterRowOutlet=V,e.HeaderRowOutlet=M,e.NoDataRowOutlet=L,e.STICKY_DIRECTIONS=q,e.StickyStyler=U,e.TEXT_COLUMN_OPTIONS=g,e._CoalescedStyleScheduler=O,e._Schedule=b,e.mixinHasStickyInput=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|