@taiga-ui/addon-table 2.41.0 → 2.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/bundles/taiga-ui-addon-table-components-table.umd.js +163 -87
  2. package/bundles/taiga-ui-addon-table-components-table.umd.js.map +1 -1
  3. package/bundles/taiga-ui-addon-table-components-table.umd.min.js +2 -2
  4. package/bundles/taiga-ui-addon-table-components-table.umd.min.js.map +1 -1
  5. package/components/table/directives/sort-by.directive.d.ts +9 -0
  6. package/components/table/directives/sortable.directive.d.ts +13 -0
  7. package/components/table/directives/table.directive.d.ts +1 -1
  8. package/components/table/index.d.ts +2 -0
  9. package/components/table/taiga-ui-addon-table-components-table.metadata.json +1 -1
  10. package/components/table/tr/tr.component.d.ts +1 -1
  11. package/esm2015/components/table/directives/sort-by.directive.js +39 -0
  12. package/esm2015/components/table/directives/sortable.directive.js +37 -0
  13. package/esm2015/components/table/directives/table.directive.js +2 -2
  14. package/esm2015/components/table/index.js +3 -1
  15. package/esm2015/components/table/table.module.js +7 -1
  16. package/esm2015/components/table/td/td.component.js +3 -3
  17. package/esm2015/components/table/tr/tr.component.js +1 -1
  18. package/esm5/components/table/directives/sort-by.directive.js +41 -0
  19. package/esm5/components/table/directives/sortable.directive.js +42 -0
  20. package/esm5/components/table/directives/table.directive.js +2 -2
  21. package/esm5/components/table/index.js +3 -1
  22. package/esm5/components/table/table.module.js +7 -1
  23. package/esm5/components/table/td/td.component.js +3 -3
  24. package/esm5/components/table/tr/tr.component.js +1 -1
  25. package/fesm2015/taiga-ui-addon-table-components-table.js +141 -74
  26. package/fesm2015/taiga-ui-addon-table-components-table.js.map +1 -1
  27. package/fesm5/taiga-ui-addon-table-components-table.js +162 -88
  28. package/fesm5/taiga-ui-addon-table-components-table.js.map +1 -1
  29. package/package.json +6 -6
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@taiga-ui/cdk"),require("@angular/common"),require("@taiga-ui/core"),require("rxjs/operators"),require("@ng-web-apis/intersection-observer"),require("rxjs"),require("@taiga-ui/kit"),require("@tinkoff/ng-polymorpheus"),require("@angular/forms"),require("@taiga-ui/addon-table/utils")):"function"==typeof define&&define.amd?define("@taiga-ui/addon-table/components/table",["exports","@angular/core","@taiga-ui/cdk","@angular/common","@taiga-ui/core","rxjs/operators","@ng-web-apis/intersection-observer","rxjs","@taiga-ui/kit","@tinkoff/ng-polymorpheus","@angular/forms","@taiga-ui/addon-table/utils"],e):e(((t=t||self)["taiga-ui"]=t["taiga-ui"]||{},t["taiga-ui"]["addon-table"]=t["taiga-ui"]["addon-table"]||{},t["taiga-ui"]["addon-table"].components=t["taiga-ui"]["addon-table"].components||{},t["taiga-ui"]["addon-table"].components.table={}),t.ng.core,t.cdk,t.ng.common,t.core$1,t.rxjs.operators,t.intersectionObserver,t.rxjs,t.kit,t.ngPolymorpheus,t.ng.forms,t["taiga-ui"]["addon-table"].utils)}(this,(function(t,e,n,o,r,i,a,s,c,u,p,d){"use strict";
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@taiga-ui/cdk"),require("@angular/common"),require("@taiga-ui/core"),require("rxjs/operators"),require("@taiga-ui/addon-table/utils"),require("@ng-web-apis/intersection-observer"),require("rxjs"),require("@taiga-ui/kit"),require("@tinkoff/ng-polymorpheus"),require("@angular/forms")):"function"==typeof define&&define.amd?define("@taiga-ui/addon-table/components/table",["exports","@angular/core","@taiga-ui/cdk","@angular/common","@taiga-ui/core","rxjs/operators","@taiga-ui/addon-table/utils","@ng-web-apis/intersection-observer","rxjs","@taiga-ui/kit","@tinkoff/ng-polymorpheus","@angular/forms"],e):e(((t=t||self)["taiga-ui"]=t["taiga-ui"]||{},t["taiga-ui"]["addon-table"]=t["taiga-ui"]["addon-table"]||{},t["taiga-ui"]["addon-table"].components=t["taiga-ui"]["addon-table"].components||{},t["taiga-ui"]["addon-table"].components.table={}),t.ng.core,t.cdk,t.ng.common,t.core$1,t.rxjs.operators,t["taiga-ui"]["addon-table"].utils,t.intersectionObserver,t.rxjs,t.kit,t.ngPolymorpheus,t.ng.forms)}(this,(function(t,e,n,o,r,i,a,s,u,c,p,l){"use strict";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
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(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var h=function(){return(h=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function f(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function g(t,e){return function(n,o){e(n,o,t)}}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}var b=function(){function t(t){this.template=t,this.tuiCell=""}return t.ctorParameters=function(){return[{type:e.TemplateRef,decorators:[{type:e.Inject,args:[e.TemplateRef]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"tuiCell",void 0),t=f([e.Directive({selector:"[tuiCell]"}),g(0,e.Inject(e.TemplateRef))],t)}(),y=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef,decorators:[{type:e.Inject,args:[e.TemplateRef]}]}]},f([e.Input()],t.prototype,"tuiHead",void 0),t=f([e.Directive({selector:"[tuiHead]"}),g(0,e.Inject(e.TemplateRef))],t)}(),v=function(){function t(t,e,o){var r=this;this.documentRef=t,this.elementRef=e,this.parentRef=o,this.tuiResized=n.typedFromEvent(this.elementRef.nativeElement,"mousedown").pipe(n.preventDefault(),i.switchMap((function(){var t=r.parentRef.nativeElement.getBoundingClientRect(),e=t.width,o=t.right;return n.typedFromEvent(r.documentRef,"mousemove").pipe(i.distinctUntilChanged(),i.map((function(t){var n=t.clientX;return e+n-o})),i.takeUntil(n.typedFromEvent(r.documentRef,"mouseup")))})))}return t.ctorParameters=function(){return[{type:Document,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]},{type:e.ElementRef,decorators:[{type:e.Inject,args:[e.ElementRef]}]},{type:e.ElementRef,decorators:[{type:e.Inject,args:[r.TUI_ELEMENT_REF]}]}]},f([e.Output()],t.prototype,"tuiResized",void 0),t=f([e.Directive({selector:"[tuiResized]"}),g(0,e.Inject(o.DOCUMENT)),g(1,e.Inject(e.ElementRef)),g(2,e.Inject(r.TUI_ELEMENT_REF))],t)}(),T=function(){function t(t){this.template=t,this.tuiRowOf=[]}return t.ngTemplateContextGuard=function(t,e){return!0},t.ctorParameters=function(){return[{type:e.TemplateRef,decorators:[{type:e.Inject,args:[e.TemplateRef]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"tuiRowOf",void 0),t=f([e.Directive({selector:"ng-template[tuiRow]"}),g(0,e.Inject(e.TemplateRef))],t)}();function I(t,e){var n=t.nativeElement,o=e.pipe(i.map((function(t){return m(t,1)[0].intersectionRatio<1})));return n["$.class._stuck"]=o,o}var x=new e.InjectionToken("Stream of sticky stuck events"),k={provide:x,deps:[e.ElementRef,a.IntersectionObserverService],useFactory:I},R=[0,1],w={labelOutside:!0};function C(t){return h(h({},t),{hideButtons:!0})}var _=[{provide:a.INTERSECTION_ROOT_MARGIN,useValue:"10000px 10000px 10000px 0px"},{provide:a.INTERSECTION_THRESHOLD,useValue:R},{provide:r.TUI_TEXTFIELD_APPEARANCE,useValue:"table"},{provide:r.TUI_TEXTFIELD_LABEL_OUTSIDE,useValue:w},{provide:c.TUI_INPUT_COUNT_OPTIONS,deps:[[new e.SkipSelf,c.TUI_INPUT_COUNT_OPTIONS]],useFactory:C},{provide:r.TUI_TEXTFIELD_SIZE,useExisting:e.forwardRef((function(){return O}))},a.IntersectionObserverService,r.MODE_PROVIDER,k],O=function(t){function o(n,o,r,i){var a=t.call(this)||this;return a.entries$=n,a.mode$=o,a.stuck$=r,a.changeDetectorRef=i,a.columns=[],a.size="m",a.direction=1,a.directionChange=new e.EventEmitter,a.sorterChange=new e.EventEmitter,a.sorter=function(){return 0},a}return function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(o,t),o.prototype.updateSorter=function(t){this.sorter===t?(this.direction=1===this.direction?-1:1,this.directionChange.emit(this.direction)):(this.sorter=t,this.sorterChange.emit(this.sorter),this.direction=1,this.directionChange.emit(1)),this.change$.next()},o.prototype.ngAfterViewInit=function(){this.changeDetectorRef.detectChanges()},o.ctorParameters=function(){return[{type:s.Observable,decorators:[{type:e.Inject,args:[a.IntersectionObserverService]}]},{type:s.Observable,decorators:[{type:e.Inject,args:[r.TUI_MODE]}]},{type:s.Observable,decorators:[{type:e.Inject,args:[x]}]},{type:e.ChangeDetectorRef,decorators:[{type:e.Inject,args:[e.ChangeDetectorRef]}]}]},f([e.Input(),n.tuiDefaultProp()],o.prototype,"columns",void 0),f([e.Input(),e.HostBinding("attr.data-size"),n.tuiDefaultProp()],o.prototype,"size",void 0),f([e.Input(),n.tuiDefaultProp()],o.prototype,"direction",void 0),f([e.Output()],o.prototype,"directionChange",void 0),f([e.Output()],o.prototype,"sorterChange",void 0),f([e.Input(),n.tuiDefaultProp()],o.prototype,"sorter",void 0),o=f([e.Directive({selector:"table[tuiTable]",providers:_,host:{"($.data-mode.attr)":"mode$","($.class._stuck)":"stuck$",style:"border-collapse: separate"}}),g(0,e.Inject(a.IntersectionObserverService)),g(1,e.Inject(r.TUI_MODE)),g(2,e.Inject(x)),g(3,e.Inject(e.ChangeDetectorRef))],o)}(n.TuiController),E=function(){function t(t){this.stuck$=t}return t.ctorParameters=function(){return[{type:s.Observable,decorators:[{type:e.Inject,args:[x]}]}]},t=f([e.Directive({selector:"thead[tuiThead]",providers:[k,a.IntersectionObserverService,{provide:a.INTERSECTION_ROOT_MARGIN,useValue:"0px 10000px 10000px 10000px"}],host:{"($.class._stuck)":"stuck$"}}),g(0,e.Inject(x))],t)}(),D=function(){function t(t){this.table=t}return t.prototype.transform=function(t){return this.sort(t,this.table.sorter,this.table.direction)},t.prototype.sort=function(t,e,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}(t).sort((function(t,o){return n*e(t,o)}))},t.ctorParameters=function(){return[{type:O,decorators:[{type:e.Inject,args:[O]}]}]},f([n.tuiPure],t.prototype,"sort",null),t=f([e.Pipe({name:"tuiTableSort",pure:!1}),g(0,e.Inject(O))],t)}(),j=r.watchedControllerFactory,P=[n.TuiDestroyService,D,{provide:O,deps:[[new e.SkipSelf,O],e.ChangeDetectorRef,n.TuiDestroyService],useFactory:j}],S=function(){function t(t,e){var o=this;this.table=t,this.body=e,this.cells=n.EMPTY_QUERY,this.cells$=this.cells.changes.pipe(i.startWith(null),i.map((function(){return o.cells.reduce((function(t,e){var n;return h(h({},t),((n={})[e.tuiCell]=e,n))}),{})}))),this.item$=this.body.rows.changes.pipe(i.startWith(null),i.map((function(){return o.body.sorted[o.body.rows.toArray().findIndex((function(t){return t===o}))]})))}return t.ctorParameters=function(){return[{type:O,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return O}))]}]},{type:z,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return z}))]}]}]},f([e.ContentChildren(e.forwardRef((function(){return b})))],t.prototype,"cells",void 0),t=f([e.Component({selector:"tr[tuiTr]",template:'<ng-container *ngIf="cells$ | async as items">\n <ng-container\n *ngFor="let key of table.columns"\n [ngTemplateOutlet]="items[key.toString()]?.template || plain"\n >\n <ng-template #plain>\n <td\n *ngIf="item$ | async as item"\n tuiTd\n >\n {{ item[key.toString()] }}\n </td>\n </ng-template>\n </ng-container>\n</ng-container>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[P]}),g(0,e.Inject(e.forwardRef((function(){return O})))),g(1,e.Inject(e.forwardRef((function(){return z}))))],t)}(),z=function(){function t(t,o){this.pipe=t,this.table=o,this.data=[],this.heading="",this.open=!0,this.openChange=new e.EventEmitter,this.rows=n.EMPTY_QUERY,this.toContext=function(t,e){return{$implicit:t,index:e}}}return Object.defineProperty(t.prototype,"sorted",{get:function(){return this.pipe.transform(this.data)},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){this.open=!this.open,this.openChange.emit(this.open)},t.ctorParameters=function(){return[{type:D,decorators:[{type:e.Inject,args:[D]}]},{type:O,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return O}))]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"data",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"heading",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"open",void 0),f([e.Output()],t.prototype,"openChange",void 0),f([e.ContentChild(e.forwardRef((function(){return T})))],t.prototype,"row",void 0),f([e.ContentChildren(e.forwardRef((function(){return S})))],t.prototype,"rows",void 0),t=f([e.Component({selector:"tbody[tuiTbody]",template:'<ng-content></ng-content>\n<tr *ngIf="heading">\n <th\n class="heading"\n [colSpan]="table.columns.length"\n >\n <button\n type="button"\n class="expand"\n (click)="onClick()"\n >\n <span\n polymorpheus-outlet\n class="name"\n [content]="heading"\n ></span>\n <tui-svg\n src="tuiIconChevronDownLarge"\n class="chevron"\n [class.chevron_rotated]="open"\n ></tui-svg>\n </button>\n </th>\n</tr>\n<ng-container *ngIf="open && row">\n <ng-container\n *ngFor="let item of sorted; let index = index"\n [ngTemplateOutlet]="row.template"\n [ngTemplateOutletContext]="item | tuiMapper: toContext:index"\n ></ng-container>\n</ng-container>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:P,styles:[":host{border-color:var(--tui-base-04)}:host tr{border-color:inherit}.expand{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;display:flex;width:100%;height:100%;align-items:center;box-sizing:border-box;outline:0;font-weight:700;cursor:pointer;border-color:inherit}.expand:focus-visible .name{background:var(--tui-selection)}.expand:after,.expand:before{content:'';position:-webkit-sticky;position:sticky;height:100%;border-left:1px solid;border-color:inherit}.expand:before{left:0}.expand:after{right:0}.heading{height:var(--tui-height-m);font:var(--tui-font-text-s);padding:0;background:var(--tui-base-02);border-bottom:1px solid var(--tui-base-04);border-color:inherit}:host-context(table[data-size='l']) .heading{font:var(--tui-font-text-m);height:var(--tui-height-l)}.name{position:-webkit-sticky;position:sticky;left:.75rem;display:inline-block}:host-context(table[data-size='l']) .name{left:1rem}.chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;right:.75rem;margin:0 .6875rem 0 auto}.chevron_rotated{transform:rotate(180deg)}"]}),g(0,e.Inject(D)),g(1,e.Inject(e.forwardRef((function(){return O}))))],t)}(),U=function(){function t(){}return f([e.HostBinding("class._editable"),e.ContentChild(p.NgControl)],t.prototype,"control",void 0),t=f([e.Component({selector:"th[tuiTd], td[tuiTd]",template:'<div class="wrapper">\n <ng-content></ng-content>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{position:relative;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;padding:0 .75rem;background:var(--tui-base-01);border:1px solid var(--tui-base-04);border-top:none}:host:first-child{left:0}:host:not(:first-child){border-left:none}:host._editable:focus-within{z-index:1}:host._editable{padding:0}:host(th){position:-webkit-sticky;position:sticky;z-index:1}:host(th):after{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;content:'';position:absolute;top:0;bottom:0;left:100%;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host(th):focus-within:not(:disabled){z-index:11}:host-context(table[data-mode=onDark]):after{background:rgba(60,60,60,.9)}:host-context(table._stuck){z-index:10}:host-context(table._stuck):last-of-type:after{opacity:1}:host-context(table[data-size='l']){font:var(--tui-font-text-m);height:var(--tui-height-l);padding:0 1rem}:host-context(table[data-size='l'])._editable{padding:0}:host(td):focus-within{z-index:1}:host(td):not(:focus-within){z-index:0}.wrapper{margin:-1px -1px -1px 0}"]})],t)}(),M=function(){function t(t,e){var n=this;this.head=t,this.table=e,this.sorter=this.head?function(t,e){return d.defaultSort(t[n.key],e[n.key])}:null,this.resizable=!1,this.sticky=!1,this.width=null}return Object.defineProperty(t.prototype,"key",{get:function(){if(!this.head)throw new n.TuiTableSortKeyException;return this.head.tuiHead},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCurrent",{get:function(){return!!this.sorter&&!!this.table&&this.sorter===this.table.sorter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this.isCurrent?"tuiIconSortDown":"tuiIconSortOff"},enumerable:!0,configurable:!0}),t.prototype.onResized=function(t){this.width=t},t.ctorParameters=function(){return[{type:y,decorators:[{type:e.Optional},{type:e.Inject,args:[y]}]},{type:O,decorators:[{type:e.Optional},{type:e.Inject,args:[e.forwardRef((function(){return O}))]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"sorter",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"resizable",void 0),f([e.Input(),e.HostBinding("class._sticky"),n.tuiDefaultProp()],t.prototype,"sticky",void 0),f([e.HostBinding("style.width.px")],t.prototype,"width",void 0),t=f([e.Component({selector:"th[tuiTh]",template:'<button\n *ngIf="sorter && table; else content"\n type="button"\n class="t-sort"\n [class.t-sort_sorted]="isCurrent"\n (click)="table.updateSorter(sorter)"\n>\n <ng-container *ngTemplateOutlet="content"></ng-container>\n {{ table.change$ | async }}\n <tui-svg\n class="t-sort-icon"\n [src]="icon"\n [class.t-sort-icon_rotated]="isCurrent && table.direction === -1"\n ></tui-svg>\n</button>\n<ng-template #content><ng-content></ng-content></ng-template>\n<div\n *ngIf="resizable"\n class="t-bar"\n (tuiResized)="onResized($event)"\n></div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:r.TUI_ELEMENT_REF,useExisting:e.ElementRef}],styles:[":host{transition-property:box-shadow;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;top:0;z-index:20;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;font-weight:700;color:var(--tui-text-02);background:var(--tui-base-01);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem rgba(237,237,237,0);border:1px solid var(--tui-base-04)}:host:not(:first-child){border-left:none}:host._sticky{position:-webkit-sticky;position:sticky;z-index:30}:host._sticky:first-child{left:0}:host._sticky:after{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;content:'';position:absolute;top:0;left:100%;bottom:0;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host-context(tr:not(:first-child)){border-top:none}:host-context(table[data-size='l']){height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:700;padding:0 1rem}:host-context(thead[tuiThead]){position:-webkit-sticky;position:sticky}:host-context(table._stuck)._sticky:after{opacity:1}:host-context(thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(237,237,237,.7)}:host-context(table[data-mode=onDark]):after{background:rgba(60,60,60,.9)}:host-context(table[data-mode=onDark]thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(60,60,60,.9)}:host-context(table[data-mode=onDark]thead[tuiThead]._stuck):first-child{box-shadow:.0625rem .3125rem rgba(60,60,60,.9)}:host-context(table[data-size='l']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-l)}:host-context(table[data-size='m']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-m)}:host-context(table[data-size='s']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-s)}.t-sort{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;display:inline-flex;flex-direction:inherit;align-items:center;outline:0;font-weight:700;cursor:pointer}.t-sort_sorted{color:var(--tui-text-01)}.t-sort_sorted .t-sort-icon_rotated{transform:scaleY(-1)}.t-sort:focus-visible{background:var(--tui-selection)}.t-sort:hover{color:var(--tui-text-01)}.t-bar{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:0;bottom:0;right:-1px;width:3px;justify-self:flex-end;border-left:2px solid transparent;background:var(--tui-support-12);background-clip:content-box;cursor:ew-resize;opacity:0}.t-bar:active,.t-bar:hover{opacity:1}"]}),g(0,e.Optional()),g(0,e.Inject(y)),g(1,e.Optional()),g(1,e.Inject(e.forwardRef((function(){return O}))))],t)}(),N=function(){function t(t){var e=this;this.table=t,this.heads=n.EMPTY_QUERY,this.heads$=this.heads.changes.pipe(i.startWith(null),i.map((function(){return e.heads.reduce((function(t,e){var n;return h(h({},t),((n={})[e.tuiHead]=e,n))}),{})})))}return t.ctorParameters=function(){return[{type:O,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return O}))]}]}]},f([e.ContentChild(e.forwardRef((function(){return M})))],t.prototype,"th",void 0),f([e.ContentChildren(e.forwardRef((function(){return y})))],t.prototype,"heads",void 0),t=f([e.Component({selector:"tr[tuiThGroup]",template:'<ng-content></ng-content>\n<ng-container *ngIf="heads$ | async as headings">\n <ng-container\n *ngFor="let key of table.columns"\n [ngTemplateOutlet]="headings[key.toString()]?.template || plain"\n >\n <ng-template #plain>\n <th\n *ngIf="!th && !heads.length"\n tuiTh\n >\n {{ key.toString() }}\n </th>\n </ng-template>\n </ng-container>\n</ng-container>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[P]}),g(0,e.Inject(e.forwardRef((function(){return O}))))],t)}(),$=function(){function t(){}return t=f([e.NgModule({imports:[o.CommonModule,u.PolymorpheusModule,n.TuiMapperPipeModule,r.TuiSvgModule],declarations:[O,z,N,M,U,S,b,y,T,E,v,D],exports:[O,z,N,M,U,S,b,y,T,E,D]})],t)}();t.TABLE_FACTORY=j,t.TABLE_LABEL=w,t.TABLE_THRESHOLD=R,t.TUI_STUCK=x,t.TUI_STUCK_PROVIDER=k,t.TUI_TABLE_PROVIDER=P,t.TUI_TABLE_PROVIDERS=_,t.TuiCellDirective=b,t.TuiHeadDirective=y,t.TuiResizedDirective=v,t.TuiRowDirective=T,t.TuiTableDirective=O,t.TuiTableModule=$,t.TuiTableSortPipe=D,t.TuiTbodyComponent=z,t.TuiTdComponent=U,t.TuiThComponent=M,t.TuiThGroupComponent=N,t.TuiTheadDirective=E,t.TuiTrComponent=S,t.inputCountOptionsFactory=C,t.stuckFactory=I,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var d=function(t,e){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var h=function(){return(h=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function f(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function g(t,e){return function(n,o){e(n,o,t)}}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}var b=function(){function t(t){this.template=t,this.tuiCell=""}return t.ctorParameters=function(){return[{type:e.TemplateRef,decorators:[{type:e.Inject,args:[e.TemplateRef]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"tuiCell",void 0),t=f([e.Directive({selector:"[tuiCell]"}),g(0,e.Inject(e.TemplateRef))],t)}(),m=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef,decorators:[{type:e.Inject,args:[e.TemplateRef]}]}]},f([e.Input()],t.prototype,"tuiHead",void 0),t=f([e.Directive({selector:"[tuiHead]"}),g(0,e.Inject(e.TemplateRef))],t)}(),v=function(){function t(t,e,o){var r=this;this.documentRef=t,this.elementRef=e,this.parentRef=o,this.tuiResized=n.typedFromEvent(this.elementRef.nativeElement,"mousedown").pipe(n.preventDefault(),i.switchMap((function(){var t=r.parentRef.nativeElement.getBoundingClientRect(),e=t.width,o=t.right;return n.typedFromEvent(r.documentRef,"mousemove").pipe(i.distinctUntilChanged(),i.map((function(t){var n=t.clientX;return e+n-o})),i.takeUntil(n.typedFromEvent(r.documentRef,"mouseup")))})))}return t.ctorParameters=function(){return[{type:Document,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]},{type:e.ElementRef,decorators:[{type:e.Inject,args:[e.ElementRef]}]},{type:e.ElementRef,decorators:[{type:e.Inject,args:[r.TUI_ELEMENT_REF]}]}]},f([e.Output()],t.prototype,"tuiResized",void 0),t=f([e.Directive({selector:"[tuiResized]"}),g(0,e.Inject(o.DOCUMENT)),g(1,e.Inject(e.ElementRef)),g(2,e.Inject(r.TUI_ELEMENT_REF))],t)}(),T=function(){function t(t){this.template=t,this.tuiRowOf=[]}return t.ngTemplateContextGuard=function(t,e){return!0},t.ctorParameters=function(){return[{type:e.TemplateRef,decorators:[{type:e.Inject,args:[e.TemplateRef]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"tuiRowOf",void 0),t=f([e.Directive({selector:"ng-template[tuiRow]"}),g(0,e.Inject(e.TemplateRef))],t)}();function I(t,e){var n=t.nativeElement,o=e.pipe(i.map((function(t){return y(t,1)[0].intersectionRatio<1})));return n["$.class._stuck"]=o,o}var x=new e.InjectionToken("Stream of sticky stuck events"),k={provide:x,deps:[e.ElementRef,s.IntersectionObserverService],useFactory:I},R=[0,1],C={labelOutside:!0};function w(t){return h(h({},t),{hideButtons:!0})}var O=[{provide:s.INTERSECTION_ROOT_MARGIN,useValue:"10000px 10000px 10000px 0px"},{provide:s.INTERSECTION_THRESHOLD,useValue:R},{provide:r.TUI_TEXTFIELD_APPEARANCE,useValue:"table"},{provide:r.TUI_TEXTFIELD_LABEL_OUTSIDE,useValue:C},{provide:c.TUI_INPUT_COUNT_OPTIONS,deps:[[new e.SkipSelf,c.TUI_INPUT_COUNT_OPTIONS]],useFactory:w},{provide:r.TUI_TEXTFIELD_SIZE,useExisting:e.forwardRef((function(){return _}))},s.IntersectionObserverService,r.MODE_PROVIDER,k],_=function(t){function o(n,o,r,i){var a=t.call(this)||this;return a.entries$=n,a.mode$=o,a.stuck$=r,a.changeDetectorRef=i,a.columns=[],a.size="m",a.direction=1,a.directionChange=new e.EventEmitter,a.sorterChange=new e.EventEmitter,a.sorter=function(){return 0},a}return function(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(o,t),o.prototype.updateSorter=function(t){this.sorter===t?(this.direction=1===this.direction?-1:1,this.directionChange.emit(this.direction)):(this.sorter=t||function(){return 0},this.sorterChange.emit(this.sorter),this.direction=1,this.directionChange.emit(1)),this.change$.next()},o.prototype.ngAfterViewInit=function(){this.changeDetectorRef.detectChanges()},o.ctorParameters=function(){return[{type:u.Observable,decorators:[{type:e.Inject,args:[s.IntersectionObserverService]}]},{type:u.Observable,decorators:[{type:e.Inject,args:[r.TUI_MODE]}]},{type:u.Observable,decorators:[{type:e.Inject,args:[x]}]},{type:e.ChangeDetectorRef,decorators:[{type:e.Inject,args:[e.ChangeDetectorRef]}]}]},f([e.Input(),n.tuiDefaultProp()],o.prototype,"columns",void 0),f([e.Input(),e.HostBinding("attr.data-size"),n.tuiDefaultProp()],o.prototype,"size",void 0),f([e.Input(),n.tuiDefaultProp()],o.prototype,"direction",void 0),f([e.Output()],o.prototype,"directionChange",void 0),f([e.Output()],o.prototype,"sorterChange",void 0),f([e.Input(),n.tuiDefaultProp()],o.prototype,"sorter",void 0),o=f([e.Directive({selector:"table[tuiTable]",providers:O,host:{"($.data-mode.attr)":"mode$","($.class._stuck)":"stuck$",style:"border-collapse: separate"}}),g(0,e.Inject(s.IntersectionObserverService)),g(1,e.Inject(r.TUI_MODE)),g(2,e.Inject(x)),g(3,e.Inject(e.ChangeDetectorRef))],o)}(n.TuiController),E=function(){function t(t,e){var n=this;this.head=t,this.table=e,this.sorter=this.head?function(t,e){return a.defaultSort(t[n.key],e[n.key])}:null,this.resizable=!1,this.sticky=!1,this.width=null}return Object.defineProperty(t.prototype,"key",{get:function(){if(!this.head)throw new n.TuiTableSortKeyException;return this.head.tuiHead},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCurrent",{get:function(){return!!this.sorter&&!!this.table&&this.sorter===this.table.sorter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this.isCurrent?"tuiIconSortDown":"tuiIconSortOff"},enumerable:!0,configurable:!0}),t.prototype.onResized=function(t){this.width=t},t.ctorParameters=function(){return[{type:m,decorators:[{type:e.Optional},{type:e.Inject,args:[m]}]},{type:_,decorators:[{type:e.Optional},{type:e.Inject,args:[e.forwardRef((function(){return _}))]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"sorter",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"resizable",void 0),f([e.Input(),e.HostBinding("class._sticky"),n.tuiDefaultProp()],t.prototype,"sticky",void 0),f([e.HostBinding("style.width.px")],t.prototype,"width",void 0),t=f([e.Component({selector:"th[tuiTh]",template:'<button\n *ngIf="sorter && table; else content"\n type="button"\n class="t-sort"\n [class.t-sort_sorted]="isCurrent"\n (click)="table.updateSorter(sorter)"\n>\n <ng-container *ngTemplateOutlet="content"></ng-container>\n {{ table.change$ | async }}\n <tui-svg\n class="t-sort-icon"\n [src]="icon"\n [class.t-sort-icon_rotated]="isCurrent && table.direction === -1"\n ></tui-svg>\n</button>\n<ng-template #content><ng-content></ng-content></ng-template>\n<div\n *ngIf="resizable"\n class="t-bar"\n (tuiResized)="onResized($event)"\n></div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:r.TUI_ELEMENT_REF,useExisting:e.ElementRef}],styles:[":host{transition-property:box-shadow;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;top:0;z-index:20;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;font-weight:700;color:var(--tui-text-02);background:var(--tui-base-01);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem rgba(237,237,237,0);border:1px solid var(--tui-base-04)}:host:not(:first-child){border-left:none}:host._sticky{position:-webkit-sticky;position:sticky;z-index:30}:host._sticky:first-child{left:0}:host._sticky:after{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;content:'';position:absolute;top:0;left:100%;bottom:0;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host-context(tr:not(:first-child)){border-top:none}:host-context(table[data-size='l']){height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:700;padding:0 1rem}:host-context(thead[tuiThead]){position:-webkit-sticky;position:sticky}:host-context(table._stuck)._sticky:after{opacity:1}:host-context(thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(237,237,237,.7)}:host-context(table[data-mode=onDark]):after{background:rgba(60,60,60,.9)}:host-context(table[data-mode=onDark]thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(60,60,60,.9)}:host-context(table[data-mode=onDark]thead[tuiThead]._stuck):first-child{box-shadow:.0625rem .3125rem rgba(60,60,60,.9)}:host-context(table[data-size='l']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-l)}:host-context(table[data-size='m']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-m)}:host-context(table[data-size='s']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-s)}.t-sort{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;display:inline-flex;flex-direction:inherit;align-items:center;outline:0;font-weight:700;cursor:pointer}.t-sort_sorted{color:var(--tui-text-01)}.t-sort_sorted .t-sort-icon_rotated{transform:scaleY(-1)}.t-sort:focus-visible{background:var(--tui-selection)}.t-sort:hover{color:var(--tui-text-01)}.t-bar{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:0;bottom:0;right:-1px;width:3px;justify-self:flex-end;border-left:2px solid transparent;background:var(--tui-support-12);background-clip:content-box;cursor:ew-resize;opacity:0}.t-bar:active,.t-bar:hover{opacity:1}"]}),g(0,e.Optional()),g(0,e.Inject(m)),g(1,e.Optional()),g(1,e.Inject(e.forwardRef((function(){return _}))))],t)}(),D=function(){function t(t,e,n){this.sortBy=t,this.table=e,this.th=n,this.sorter=function(){return 0},this.th.sorter=this.sorter}return Object.defineProperty(t.prototype,"key",{get:function(){return this.th.key},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){this.sortBy.tuiSortBy===this.key&&this.table.sorter!==this.sorter&&this.table.updateSorter(this.sorter)},t.ctorParameters=function(){return[{type:j,decorators:[{type:e.Inject,args:[j]}]},{type:_,decorators:[{type:e.Inject,args:[_]}]},{type:E,decorators:[{type:e.Inject,args:[E]}]}]},t=f([e.Directive({selector:"th[tuiTh][tuiSortable]"}),g(0,e.Inject(j)),g(1,e.Inject(_)),g(2,e.Inject(E))],t)}(),j=function(){function t(t){var e=this;this.table=t,this.sortables=n.EMPTY_QUERY,this.tuiSortBy=null,this.tuiSortByChange=this.table.sorterChange.pipe(i.filter((function(){return!!e.sortables.length})),i.map((function(t){return e.getKey(t)})))}return t.prototype.getKey=function(t){var e,n;return null!==(n=null===(e=this.sortables.find((function(e){return e.sorter===t})))||void 0===e?void 0:e.key)&&void 0!==n?n:null},t.ctorParameters=function(){return[{type:_,decorators:[{type:e.Inject,args:[_]}]}]},f([e.ContentChildren(D,{descendants:!0})],t.prototype,"sortables",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"tuiSortBy",void 0),f([e.Output()],t.prototype,"tuiSortByChange",void 0),t=f([e.Directive({selector:"table[tuiTable][tuiSortBy]"}),g(0,e.Inject(_))],t)}(),P=function(){function t(t){this.stuck$=t}return t.ctorParameters=function(){return[{type:u.Observable,decorators:[{type:e.Inject,args:[x]}]}]},t=f([e.Directive({selector:"thead[tuiThead]",providers:[k,s.IntersectionObserverService,{provide:s.INTERSECTION_ROOT_MARGIN,useValue:"0px 10000px 10000px 10000px"}],host:{"($.class._stuck)":"stuck$"}}),g(0,e.Inject(x))],t)}(),S=function(){function t(t){this.table=t}return t.prototype.transform=function(t){return this.sort(t,this.table.sorter,this.table.direction)},t.prototype.sort=function(t,e,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}(t).sort((function(t,o){return n*e(t,o)}))},t.ctorParameters=function(){return[{type:_,decorators:[{type:e.Inject,args:[_]}]}]},f([n.tuiPure],t.prototype,"sort",null),t=f([e.Pipe({name:"tuiTableSort",pure:!1}),g(0,e.Inject(_))],t)}(),z=r.watchedControllerFactory,U=[n.TuiDestroyService,S,{provide:_,deps:[[new e.SkipSelf,_],e.ChangeDetectorRef,n.TuiDestroyService],useFactory:z}],M=function(){function t(t,e){var o=this;this.table=t,this.body=e,this.cells=n.EMPTY_QUERY,this.cells$=this.cells.changes.pipe(i.startWith(null),i.map((function(){return o.cells.reduce((function(t,e){var n;return h(h({},t),((n={})[e.tuiCell]=e,n))}),{})}))),this.item$=this.body.rows.changes.pipe(i.startWith(null),i.map((function(){return o.body.sorted[o.body.rows.toArray().findIndex((function(t){return t===o}))]})))}return t.ctorParameters=function(){return[{type:_,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return _}))]}]},{type:B,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return B}))]}]}]},f([e.ContentChildren(e.forwardRef((function(){return b})))],t.prototype,"cells",void 0),t=f([e.Component({selector:"tr[tuiTr]",template:'<ng-container *ngIf="cells$ | async as items">\n <ng-container\n *ngFor="let key of table.columns"\n [ngTemplateOutlet]="items[key.toString()]?.template || plain"\n >\n <ng-template #plain>\n <td\n *ngIf="item$ | async as item"\n tuiTd\n >\n {{ item[key.toString()] }}\n </td>\n </ng-template>\n </ng-container>\n</ng-container>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[U]}),g(0,e.Inject(e.forwardRef((function(){return _})))),g(1,e.Inject(e.forwardRef((function(){return B}))))],t)}(),B=function(){function t(t,o){this.pipe=t,this.table=o,this.data=[],this.heading="",this.open=!0,this.openChange=new e.EventEmitter,this.rows=n.EMPTY_QUERY,this.toContext=function(t,e){return{$implicit:t,index:e}}}return Object.defineProperty(t.prototype,"sorted",{get:function(){return this.pipe.transform(this.data)},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){this.open=!this.open,this.openChange.emit(this.open)},t.ctorParameters=function(){return[{type:S,decorators:[{type:e.Inject,args:[S]}]},{type:_,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return _}))]}]}]},f([e.Input(),n.tuiDefaultProp()],t.prototype,"data",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"heading",void 0),f([e.Input(),n.tuiDefaultProp()],t.prototype,"open",void 0),f([e.Output()],t.prototype,"openChange",void 0),f([e.ContentChild(e.forwardRef((function(){return T})))],t.prototype,"row",void 0),f([e.ContentChildren(e.forwardRef((function(){return M})))],t.prototype,"rows",void 0),t=f([e.Component({selector:"tbody[tuiTbody]",template:'<ng-content></ng-content>\n<tr *ngIf="heading">\n <th\n class="heading"\n [colSpan]="table.columns.length"\n >\n <button\n type="button"\n class="expand"\n (click)="onClick()"\n >\n <span\n polymorpheus-outlet\n class="name"\n [content]="heading"\n ></span>\n <tui-svg\n src="tuiIconChevronDownLarge"\n class="chevron"\n [class.chevron_rotated]="open"\n ></tui-svg>\n </button>\n </th>\n</tr>\n<ng-container *ngIf="open && row">\n <ng-container\n *ngFor="let item of sorted; let index = index"\n [ngTemplateOutlet]="row.template"\n [ngTemplateOutletContext]="item | tuiMapper: toContext:index"\n ></ng-container>\n</ng-container>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:U,styles:[":host{border-color:var(--tui-base-04)}:host tr{border-color:inherit}.expand{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;display:flex;width:100%;height:100%;align-items:center;box-sizing:border-box;outline:0;font-weight:700;cursor:pointer;border-color:inherit}.expand:focus-visible .name{background:var(--tui-selection)}.expand:after,.expand:before{content:'';position:-webkit-sticky;position:sticky;height:100%;border-left:1px solid;border-color:inherit}.expand:before{left:0}.expand:after{right:0}.heading{height:var(--tui-height-m);font:var(--tui-font-text-s);padding:0;background:var(--tui-base-02);border-bottom:1px solid var(--tui-base-04);border-color:inherit}:host-context(table[data-size='l']) .heading{font:var(--tui-font-text-m);height:var(--tui-height-l)}.name{position:-webkit-sticky;position:sticky;left:.75rem;display:inline-block}:host-context(table[data-size='l']) .name{left:1rem}.chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;right:.75rem;margin:0 .6875rem 0 auto}.chevron_rotated{transform:rotate(180deg)}"]}),g(0,e.Inject(S)),g(1,e.Inject(e.forwardRef((function(){return _}))))],t)}(),N=function(){function t(){}return f([e.HostBinding("class._editable"),e.ContentChild(l.NgControl)],t.prototype,"control",void 0),t=f([e.Component({selector:"th[tuiTd], td[tuiTd]",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{position:relative;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;padding:0 .75rem;background:var(--tui-base-01);border:1px solid var(--tui-base-04);border-top:none;box-sizing:border-box;transform:translate3d(0,0,0)}:host:first-child{left:0}:host:not(:first-child){border-left:none}:host._editable:focus-within{z-index:1}:host._editable{padding:0;vertical-align:top}:host(th){position:-webkit-sticky;position:sticky;z-index:1}:host(th):after{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;content:'';position:absolute;top:0;bottom:0;left:100%;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host(th):focus-within:not(:disabled){z-index:11}:host-context(table[data-mode=onDark]):after{background:rgba(60,60,60,.9)}:host-context(table._stuck){z-index:10}:host-context(table._stuck):last-of-type:after{opacity:1}:host-context(table[data-size='l']){font:var(--tui-font-text-m);height:var(--tui-height-l);padding-left:1rem;padding-right:1rem}:host-context(table[data-size='l'])._editable{padding:0}:host(td):focus-within{z-index:1}:host(td):not(:focus-within){z-index:0}"]})],t)}(),$=function(){function t(t){var e=this;this.table=t,this.heads=n.EMPTY_QUERY,this.heads$=this.heads.changes.pipe(i.startWith(null),i.map((function(){return e.heads.reduce((function(t,e){var n;return h(h({},t),((n={})[e.tuiHead]=e,n))}),{})})))}return t.ctorParameters=function(){return[{type:_,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return _}))]}]}]},f([e.ContentChild(e.forwardRef((function(){return E})))],t.prototype,"th",void 0),f([e.ContentChildren(e.forwardRef((function(){return m})))],t.prototype,"heads",void 0),t=f([e.Component({selector:"tr[tuiThGroup]",template:'<ng-content></ng-content>\n<ng-container *ngIf="heads$ | async as headings">\n <ng-container\n *ngFor="let key of table.columns"\n [ngTemplateOutlet]="headings[key.toString()]?.template || plain"\n >\n <ng-template #plain>\n <th\n *ngIf="!th && !heads.length"\n tuiTh\n >\n {{ key.toString() }}\n </th>\n </ng-template>\n </ng-container>\n</ng-container>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[U]}),g(0,e.Inject(e.forwardRef((function(){return _}))))],t)}(),F=function(){function t(){}return t=f([e.NgModule({imports:[o.CommonModule,p.PolymorpheusModule,n.TuiMapperPipeModule,r.TuiSvgModule],declarations:[_,B,$,E,N,M,b,m,T,j,D,P,v,S],exports:[_,B,$,E,N,M,b,m,T,j,D,P,S]})],t)}();t.TABLE_FACTORY=z,t.TABLE_LABEL=C,t.TABLE_THRESHOLD=R,t.TUI_STUCK=x,t.TUI_STUCK_PROVIDER=k,t.TUI_TABLE_PROVIDER=U,t.TUI_TABLE_PROVIDERS=O,t.TuiCellDirective=b,t.TuiHeadDirective=m,t.TuiResizedDirective=v,t.TuiRowDirective=T,t.TuiSortByDirective=j,t.TuiSortableDirective=D,t.TuiTableDirective=_,t.TuiTableModule=F,t.TuiTableSortPipe=S,t.TuiTbodyComponent=B,t.TuiTdComponent=N,t.TuiThComponent=E,t.TuiThGroupComponent=$,t.TuiTheadDirective=P,t.TuiTrComponent=M,t.inputCountOptionsFactory=w,t.stuckFactory=I,Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=taiga-ui-addon-table-components-table.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/addon-table/components/table/directives/cell.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/head.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/resized.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/row.directive.ts","ng://@taiga-ui/addon-table/components/table/providers/stuck.provider.ts","ng://@taiga-ui/addon-table/components/table/providers/table.providers.ts","ng://@taiga-ui/addon-table/components/table/directives/table.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/thead.directive.ts","ng://@taiga-ui/addon-table/components/table/pipes/table-sort.pipe.ts","ng://@taiga-ui/addon-table/components/table/providers/table.provider.ts","ng://@taiga-ui/addon-table/components/table/tr/tr.component.ts","ng://@taiga-ui/addon-table/components/table/tbody/tbody.component.ts","ng://@taiga-ui/addon-table/components/table/td/td.component.ts","ng://@taiga-ui/addon-table/components/table/th/th.component.ts","ng://@taiga-ui/addon-table/components/table/th-group/th-group.component.ts","ng://@taiga-ui/addon-table/components/table/table.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","apply","this","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__read","o","m","Symbol","iterator","e","ar","next","done","push","value","error","TuiCellDirective","template","tuiCell","TemplateRef","type","Inject","args","Input","tuiDefaultProp","Directive","selector","TuiHeadDirective","TuiResizedDirective","documentRef","elementRef","parentRef","_this","tuiResized","typedFromEvent","nativeElement","pipe","preventDefault","switchMap","_a","getBoundingClientRect","width","right","distinctUntilChanged","map","clientX","takeUntil","Document","DOCUMENT","ElementRef","TUI_ELEMENT_REF","Output","TuiRowDirective","tuiRowOf","ngTemplateContextGuard","_dir","_ctx","stuckFactory","entries$","stream$","intersectionRatio","TUI_STUCK","InjectionToken","TUI_STUCK_PROVIDER","provide","deps","IntersectionObserverService","useFactory","TABLE_THRESHOLD","TABLE_LABEL","labelOutside","inputCountOptionsFactory","options","hideButtons","TUI_TABLE_PROVIDERS","INTERSECTION_ROOT_MARGIN","useValue","INTERSECTION_THRESHOLD","TUI_TEXTFIELD_APPEARANCE","TUI_TEXTFIELD_LABEL_OUTSIDE","TUI_INPUT_COUNT_OPTIONS","SkipSelf","TUI_TEXTFIELD_SIZE","useExisting","forwardRef","TuiTableDirective","MODE_PROVIDER","mode$","stuck$","changeDetectorRef","_super","columns","size","direction","directionChange","EventEmitter","sorterChange","sorter","__","constructor","create","__extends","updateSorter","emit","change$","ngAfterViewInit","detectChanges","Observable","TUI_MODE","ChangeDetectorRef","HostBinding","providers","host","($.data-mode.attr)","($.class._stuck)","style","TuiController","TuiTheadDirective","TuiTableSortPipe","table","transform","data","sort","concat","__spread","a","tuiPure","Pipe","name","pure","TABLE_FACTORY","watchedControllerFactory","TUI_TABLE_PROVIDER","TuiDestroyService","TuiTrComponent","body","cells","EMPTY_QUERY","cells$","changes","startWith","reduce","record","item","item$","rows","sorted","toArray","findIndex","row","TuiTbodyComponent","ContentChildren","Component","changeDetection","ChangeDetectionStrategy","OnPush","heading","open","openChange","toContext","$implicit","index","onClick","ContentChild","TuiTdComponent","NgControl","TuiThComponent","head","defaultSort","resizable","sticky","TuiTableSortKeyException","tuiHead","isCurrent","onResized","Optional","TuiThGroupComponent","heads","heads$","TuiTableModule","NgModule","imports","CommonModule","PolymorpheusModule","TuiMapperPipeModule","TuiSvgModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IASrB,IAAIO,EAAW,WAQlB,OAPAA,EAAWN,OAAOO,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIN,KADTK,EAAIG,UAAUF,GACOV,OAAOc,UAAUT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EAAAA,YACA9K,EAAA,EAAAoB,EAAAA,OAAO+D,EAAAA,YAAW,WAAM,OAAAC,QAxBpBiF,mBCUT,SAAAU,EAEazD,GAFb,IAAAvF,EAAA3C,KAEaA,KAAAkI,MAAAA,EAdJlI,KAAA4L,MAAwCxC,EAAAA,YAExCpJ,KAAA6L,OAAS7L,KAAK4L,MAAMtC,QAAQvG,KACjCwG,EAAAA,UAAU,MACVhG,EAAAA,KAAI,WACA,OAAAZ,EAAKiJ,MAAMpC,QACP,SAACC,EAAQC,SAAS,OAAArK,EAAAA,EAAA,GAAKoK,KAAMvG,EAAA,IAAGwG,EAAK6B,SAAU7B,EAAIxG,MACnD,QAShB,gDAFwB8C,EAAiB9F,WAAA,CAAA,CAAA6B,KADhCC,EAAAA,OAAMC,KAAA,CAAC8D,EAAAA,YAAW,WAAM,OAAAC,WAhB7B/F,EAAA,CADC6K,EAAAA,aAAa/E,EAAAA,YAAW,WAAM,OAAAkF,gCAI/BhL,EAAA,CADCiK,EAAAA,gBAAgBnE,EAAAA,YAAW,WAAM,OAAAzD,mCAJzBqJ,EAAmB1L,EAAA,CAN/BkK,EAAAA,UAAU,CACP9H,SAAU,iBACVT,SAAA,0dACAwI,gBAAiBC,EAAAA,wBAAwBC,OACzC5C,UAAW,CAACqB,KAoBPnI,EAAA,EAAAoB,EAAAA,OAAO+D,EAAAA,YAAW,WAAM,OAAAC,QAlBpB2F,mBC0Bb,SAAAG,KAA6B,OAAhBA,EAAc7L,EAAA,CA9B1B8L,EAAAA,SAAS,CACNC,QAAS,CAACC,EAAAA,aAAcC,EAAAA,mBAAoBC,EAAAA,oBAAqBC,EAAAA,cACjEC,aAAc,CACVrG,EACAiE,EACA0B,EACAV,EACAF,EACA9B,EACAtH,EACAW,EACAyB,EACAiE,EACAzF,EACA0F,GAEJqE,QAAS,CACLtG,EACAiE,EACA0B,EACAV,EACAF,EACA9B,EACAtH,EACAW,EACAyB,EACAiE,EACAC,MAGK6D","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n 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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {Directive, Inject, Input, TemplateRef} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: '[tuiCell]',\n})\nexport class TuiCellDirective {\n @Input()\n @tuiDefaultProp()\n tuiCell = '';\n\n constructor(@Inject(TemplateRef) readonly template: TemplateRef<{}>) {}\n}\n","import {Directive, Inject, Input, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[tuiHead]',\n})\nexport class TuiHeadDirective<T extends Record<any, any>> {\n @Input()\n tuiHead!: keyof T;\n\n constructor(@Inject(TemplateRef) readonly template: TemplateRef<{}>) {}\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {preventDefault, typedFromEvent} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\nimport {distinctUntilChanged, map, switchMap, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiResized]',\n})\nexport class TuiResizedDirective {\n @Output()\n readonly tuiResized = typedFromEvent(this.elementRef.nativeElement, 'mousedown').pipe(\n preventDefault(),\n switchMap(() => {\n const {width, right} = this.parentRef.nativeElement.getBoundingClientRect();\n\n return typedFromEvent(this.documentRef, 'mousemove').pipe(\n distinctUntilChanged(),\n map(({clientX}) => width + clientX - right),\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n );\n }),\n );\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_ELEMENT_REF)\n private readonly parentRef: ElementRef<HTMLTableHeaderCellElement>,\n ) {}\n}\n","import {Directive, Inject, Input, TemplateRef} from '@angular/core';\nimport {TuiRowContext} from '@taiga-ui/addon-table/interfaces';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'ng-template[tuiRow]',\n})\nexport class TuiRowDirective<T> {\n @Input()\n @tuiDefaultProp()\n tuiRowOf: readonly T[] = [];\n\n constructor(@Inject(TemplateRef) readonly template: TemplateRef<TuiRowContext<T>>) {}\n\n static ngTemplateContextGuard<T>(\n _dir: TuiRowDirective<T>,\n _ctx: any,\n ): _ctx is TuiRowContext<T> {\n return true;\n }\n}\n","import {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function stuckFactory(\n {nativeElement}: ElementRef,\n entries$: Observable<IntersectionObserverEntry[]>,\n): Observable<boolean> {\n const stream$ = entries$.pipe(map(([{intersectionRatio}]) => intersectionRatio < 1));\n\n nativeElement['$.class._stuck'] = stream$;\n\n return stream$;\n}\n\nexport const TUI_STUCK = new InjectionToken<boolean>('Stream of sticky stuck events');\n\nexport const TUI_STUCK_PROVIDER: Provider = {\n provide: TUI_STUCK,\n deps: [ElementRef, IntersectionObserverService],\n useFactory: stuckFactory,\n};\n","import {forwardRef, SkipSelf} from '@angular/core';\nimport {\n INTERSECTION_ROOT_MARGIN,\n INTERSECTION_THRESHOLD,\n IntersectionObserverService,\n} from '@ng-web-apis/intersection-observer';\nimport {\n MODE_PROVIDER,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TUI_TEXTFIELD_SIZE,\n} from '@taiga-ui/core';\nimport {TUI_INPUT_COUNT_OPTIONS, TuiInputCountOptions} from '@taiga-ui/kit';\n\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TUI_STUCK_PROVIDER} from './stuck.provider';\n\n// TODO: remove in ivy compilation\nexport const TABLE_THRESHOLD = [0, 1];\nexport const TABLE_LABEL = {\n labelOutside: true,\n};\n\nexport function inputCountOptionsFactory(\n options: TuiInputCountOptions,\n): TuiInputCountOptions {\n return {...options, hideButtons: true};\n}\n\nexport const TUI_TABLE_PROVIDERS = [\n {\n provide: INTERSECTION_ROOT_MARGIN,\n useValue: '10000px 10000px 10000px 0px',\n },\n {\n provide: INTERSECTION_THRESHOLD,\n useValue: TABLE_THRESHOLD,\n },\n {\n provide: TUI_TEXTFIELD_APPEARANCE,\n // TODO: remove in ivy compilation\n useValue: 'table', // TuiAppearance.Table\n },\n {\n provide: TUI_TEXTFIELD_LABEL_OUTSIDE,\n useValue: TABLE_LABEL,\n },\n {\n provide: TUI_INPUT_COUNT_OPTIONS,\n deps: [[new SkipSelf(), TUI_INPUT_COUNT_OPTIONS]],\n useFactory: inputCountOptionsFactory,\n },\n {\n provide: TUI_TEXTFIELD_SIZE,\n useExisting: forwardRef(() => TuiTableDirective),\n },\n IntersectionObserverService,\n MODE_PROVIDER,\n TUI_STUCK_PROVIDER,\n];\n","import {\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {TuiController, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TUI_MODE, TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_STUCK} from '../providers/stuck.provider';\nimport {TUI_TABLE_PROVIDERS} from '../providers/table.providers';\n\n@Directive({\n selector: 'table[tuiTable]',\n providers: TUI_TABLE_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '($.class._stuck)': 'stuck$',\n style: 'border-collapse: separate',\n },\n})\nexport class TuiTableDirective<T> extends TuiController {\n @Input()\n @tuiDefaultProp()\n columns: ReadonlyArray<keyof T | string> = [];\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n direction: -1 | 1 = 1;\n\n @Output()\n readonly directionChange = new EventEmitter<-1 | 1>();\n\n @Output()\n readonly sorterChange = new EventEmitter<TuiComparator<T> | null>();\n\n constructor(\n @Inject(IntersectionObserverService)\n readonly entries$: Observable<IntersectionObserverEntry[]>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_STUCK) readonly stuck$: Observable<boolean>,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n ) {\n super();\n }\n\n @Input()\n @tuiDefaultProp()\n sorter: TuiComparator<T> = () => 0;\n\n updateSorter(sorter: TuiComparator<T>) {\n if (this.sorter === sorter) {\n this.direction = this.direction === 1 ? -1 : 1;\n this.directionChange.emit(this.direction);\n } else {\n this.sorter = sorter;\n this.sorterChange.emit(this.sorter);\n this.direction = 1;\n this.directionChange.emit(1);\n }\n\n this.change$.next();\n }\n\n ngAfterViewInit() {\n this.changeDetectorRef.detectChanges();\n }\n}\n","import {Directive, Inject} from '@angular/core';\nimport {\n INTERSECTION_ROOT_MARGIN,\n IntersectionObserverService,\n} from '@ng-web-apis/intersection-observer';\nimport {Observable} from 'rxjs';\n\nimport {TUI_STUCK, TUI_STUCK_PROVIDER} from '../providers/stuck.provider';\n\n@Directive({\n selector: 'thead[tuiThead]',\n providers: [\n TUI_STUCK_PROVIDER,\n IntersectionObserverService,\n {\n provide: INTERSECTION_ROOT_MARGIN,\n useValue: '0px 10000px 10000px 10000px',\n },\n ],\n host: {\n '($.class._stuck)': 'stuck$',\n },\n})\nexport class TuiTheadDirective {\n constructor(@Inject(TUI_STUCK) readonly stuck$: Observable<boolean>) {}\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {tuiPure} from '@taiga-ui/cdk';\n\nimport {TuiTableDirective} from '../directives/table.directive';\n\n@Pipe({\n name: 'tuiTableSort',\n pure: false,\n})\nexport class TuiTableSortPipe<T> implements PipeTransform {\n constructor(\n @Inject(TuiTableDirective) private readonly table: TuiTableDirective<T>,\n ) {}\n\n transform(data: readonly T[]): readonly T[] {\n return this.sort(data, this.table.sorter, this.table.direction);\n }\n\n @tuiPure\n private sort(\n data: readonly T[],\n sorter: TuiComparator<T>,\n direction: -1 | 1,\n ): readonly T[] {\n return [...data].sort((a, b) => direction * sorter(a, b));\n }\n}\n","import {ChangeDetectorRef, Provider, SkipSelf} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {watchedControllerFactory} from '@taiga-ui/core';\n\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TuiTableSortPipe} from '../pipes/table-sort.pipe';\n\n// TODO: remove in ivy compilation\nexport const TABLE_FACTORY = watchedControllerFactory;\n\nexport const TUI_TABLE_PROVIDER: Provider[] = [\n TuiDestroyService,\n TuiTableSortPipe,\n {\n provide: TuiTableDirective,\n deps: [[new SkipSelf(), TuiTableDirective], ChangeDetectorRef, TuiDestroyService],\n useFactory: TABLE_FACTORY,\n },\n];\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n forwardRef,\n Inject,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {TuiCellDirective} from '../directives/cell.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TUI_TABLE_PROVIDER} from '../providers/table.provider';\nimport {TuiTbodyComponent} from '../tbody/tbody.component';\n\n@Component({\n selector: 'tr[tuiTr]',\n templateUrl: './tr.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TUI_TABLE_PROVIDER],\n})\nexport class TuiTrComponent<T> {\n @ContentChildren(forwardRef(() => TuiCellDirective))\n private readonly cells: QueryList<TuiCellDirective> = EMPTY_QUERY;\n\n readonly cells$ = this.cells.changes.pipe(\n startWith(null),\n map(() =>\n this.cells.reduce<Record<any, TuiCellDirective>>(\n (record, item) => ({...record, [item.tuiCell]: item}),\n {},\n ),\n ),\n );\n\n readonly item$ = this.body.rows.changes.pipe(\n startWith(null),\n map(\n () =>\n this.body.sorted[this.body.rows.toArray().findIndex(row => row === this)],\n ),\n );\n\n constructor(\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T>,\n @Inject(forwardRef(() => TuiTbodyComponent))\n private readonly body: TuiTbodyComponent<T>,\n ) {}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiRowDirective} from '../directives/row.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TuiTableSortPipe} from '../pipes/table-sort.pipe';\nimport {TUI_TABLE_PROVIDER} from '../providers/table.provider';\nimport {TuiTrComponent} from '../tr/tr.component';\n\n@Component({\n selector: 'tbody[tuiTbody]',\n templateUrl: './tbody.template.html',\n styleUrls: ['./tbody.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TABLE_PROVIDER,\n})\nexport class TuiTbodyComponent<T> {\n @Input()\n @tuiDefaultProp()\n data: readonly T[] = [];\n\n @Input()\n @tuiDefaultProp()\n heading: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n open = true;\n\n @Output()\n readonly openChange = new EventEmitter<boolean>();\n\n @ContentChild(forwardRef(() => TuiRowDirective))\n readonly row?: TuiRowDirective<T>;\n\n @ContentChildren(forwardRef(() => TuiTrComponent))\n readonly rows: QueryList<TuiTrComponent<T>> = EMPTY_QUERY;\n\n constructor(\n @Inject(TuiTableSortPipe) private readonly pipe: TuiTableSortPipe<T>,\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T>,\n ) {}\n\n get sorted(): readonly T[] {\n return this.pipe.transform(this.data);\n }\n\n readonly toContext = ($implicit: T, index: number) => ({$implicit, index});\n\n onClick() {\n this.open = !this.open;\n this.openChange.emit(this.open);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\n\n@Component({\n selector: 'th[tuiTd], td[tuiTd]',\n templateUrl: './td.template.html',\n styleUrls: ['./td.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTdComponent {\n @HostBinding('class._editable')\n @ContentChild(NgControl)\n readonly control: unknown;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {defaultSort} from '@taiga-ui/addon-table/utils';\nimport {tuiDefaultProp, TuiTableSortKeyException} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\n\nimport {TuiHeadDirective} from '../directives/head.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\n\n@Component({\n selector: 'th[tuiTh]',\n templateUrl: './th.template.html',\n styleUrls: ['./th.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_ELEMENT_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiThComponent<T> {\n @Input()\n @tuiDefaultProp()\n sorter: TuiComparator<T> | null = this.head\n ? (a, b) => defaultSort(a[this.key], b[this.key])\n : null;\n\n @Input()\n @tuiDefaultProp()\n resizable = false;\n\n @Input()\n @HostBinding('class._sticky')\n @tuiDefaultProp()\n sticky = false;\n\n @HostBinding('style.width.px')\n width: number | null = null;\n\n constructor(\n @Optional()\n @Inject(TuiHeadDirective)\n private readonly head: TuiHeadDirective<T> | null,\n @Optional()\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T> | null,\n ) {}\n\n get key(): keyof T {\n if (!this.head) {\n throw new TuiTableSortKeyException();\n }\n\n return this.head.tuiHead;\n }\n\n get isCurrent(): boolean {\n return !!this.sorter && !!this.table && this.sorter === this.table.sorter;\n }\n\n get icon(): string {\n return this.isCurrent ? 'tuiIconSortDown' : 'tuiIconSortOff';\n }\n\n onResized(width: number) {\n this.width = width;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n Inject,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {TuiHeadDirective} from '../directives/head.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TUI_TABLE_PROVIDER} from '../providers/table.provider';\nimport {TuiThComponent} from '../th/th.component';\n\n@Component({\n selector: 'tr[tuiThGroup]',\n templateUrl: './th-group.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TUI_TABLE_PROVIDER],\n})\nexport class TuiThGroupComponent<T> {\n @ContentChild(forwardRef(() => TuiThComponent))\n readonly th: unknown;\n\n @ContentChildren(forwardRef(() => TuiHeadDirective))\n readonly heads: QueryList<TuiHeadDirective<T>> = EMPTY_QUERY;\n\n readonly heads$ = this.heads.changes.pipe(\n startWith(null),\n map(() =>\n this.heads.reduce<Record<any, TuiHeadDirective<T>>>(\n (record, item) => ({...record, [item.tuiHead]: item}),\n {},\n ),\n ),\n );\n\n constructor(\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T>,\n ) {}\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiCellDirective} from './directives/cell.directive';\nimport {TuiHeadDirective} from './directives/head.directive';\nimport {TuiResizedDirective} from './directives/resized.directive';\nimport {TuiRowDirective} from './directives/row.directive';\nimport {TuiTableDirective} from './directives/table.directive';\nimport {TuiTheadDirective} from './directives/thead.directive';\nimport {TuiTableSortPipe} from './pipes/table-sort.pipe';\nimport {TuiTbodyComponent} from './tbody/tbody.component';\nimport {TuiTdComponent} from './td/td.component';\nimport {TuiThComponent} from './th/th.component';\nimport {TuiThGroupComponent} from './th-group/th-group.component';\nimport {TuiTrComponent} from './tr/tr.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule],\n declarations: [\n TuiTableDirective,\n TuiTbodyComponent,\n TuiThGroupComponent,\n TuiThComponent,\n TuiTdComponent,\n TuiTrComponent,\n TuiCellDirective,\n TuiHeadDirective,\n TuiRowDirective,\n TuiTheadDirective,\n TuiResizedDirective,\n TuiTableSortPipe,\n ],\n exports: [\n TuiTableDirective,\n TuiTbodyComponent,\n TuiThGroupComponent,\n TuiThComponent,\n TuiTdComponent,\n TuiTrComponent,\n TuiCellDirective,\n TuiHeadDirective,\n TuiRowDirective,\n TuiTheadDirective,\n TuiTableSortPipe,\n ],\n})\nexport class TuiTableModule {}\n"]}
1
+ {"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/addon-table/components/table/directives/cell.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/head.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/resized.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/row.directive.ts","ng://@taiga-ui/addon-table/components/table/providers/stuck.provider.ts","ng://@taiga-ui/addon-table/components/table/providers/table.providers.ts","ng://@taiga-ui/addon-table/components/table/directives/table.directive.ts","ng://@taiga-ui/addon-table/components/table/th/th.component.ts","ng://@taiga-ui/addon-table/components/table/directives/sortable.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/sort-by.directive.ts","ng://@taiga-ui/addon-table/components/table/directives/thead.directive.ts","ng://@taiga-ui/addon-table/components/table/pipes/table-sort.pipe.ts","ng://@taiga-ui/addon-table/components/table/providers/table.provider.ts","ng://@taiga-ui/addon-table/components/table/tr/tr.component.ts","ng://@taiga-ui/addon-table/components/table/tbody/tbody.component.ts","ng://@taiga-ui/addon-table/components/table/td/td.component.ts","ng://@taiga-ui/addon-table/components/table/th-group/th-group.component.ts","ng://@taiga-ui/addon-table/components/table/table.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","apply","this","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__read","o","m","Symbol","iterator","e","ar","next","done","push","value","error","TuiCellDirective","template","tuiCell","TemplateRef","type","Inject","args","Input","tuiDefaultProp","Directive","selector","TuiHeadDirective","TuiResizedDirective","documentRef","elementRef","parentRef","_this","tuiResized","typedFromEvent","nativeElement","pipe","preventDefault","switchMap","_a","getBoundingClientRect","width","right","distinctUntilChanged","map","clientX","takeUntil","Document","DOCUMENT","ElementRef","TUI_ELEMENT_REF","Output","TuiRowDirective","tuiRowOf","ngTemplateContextGuard","_dir","_ctx","stuckFactory","entries$","stream$","intersectionRatio","TUI_STUCK","InjectionToken","TUI_STUCK_PROVIDER","provide","deps","IntersectionObserverService","useFactory","TABLE_THRESHOLD","TABLE_LABEL","labelOutside","inputCountOptionsFactory","options","hideButtons","TUI_TABLE_PROVIDERS","INTERSECTION_ROOT_MARGIN","useValue","INTERSECTION_THRESHOLD","TUI_TEXTFIELD_APPEARANCE","TUI_TEXTFIELD_LABEL_OUTSIDE","TUI_INPUT_COUNT_OPTIONS","SkipSelf","TUI_TEXTFIELD_SIZE","useExisting","forwardRef","TuiTableDirective","MODE_PROVIDER","mode$","stuck$","changeDetectorRef","_super","columns","size","direction","directionChange","EventEmitter","sorterChange","sorter","__","constructor","create","__extends","updateSorter","emit","change$","ngAfterViewInit","detectChanges","Observable","TUI_MODE","ChangeDetectorRef","HostBinding","providers","host","($.data-mode.attr)","($.class._stuck)","style","TuiController","TuiThComponent","head","table","a","defaultSort","resizable","sticky","TuiTableSortKeyException","tuiHead","isCurrent","onResized","Optional","Component","changeDetection","ChangeDetectionStrategy","OnPush","TuiSortableDirective","sortBy","th","ngDoCheck","tuiSortBy","TuiSortByDirective","sortables","EMPTY_QUERY","tuiSortByChange","filter","getKey","_b","find","ContentChildren","descendants","TuiTheadDirective","TuiTableSortPipe","transform","data","sort","concat","__spread","tuiPure","Pipe","name","pure","TABLE_FACTORY","watchedControllerFactory","TUI_TABLE_PROVIDER","TuiDestroyService","TuiTrComponent","body","cells","cells$","changes","startWith","reduce","record","item","item$","rows","sorted","toArray","findIndex","row","TuiTbodyComponent","heading","open","openChange","toContext","$implicit","index","onClick","ContentChild","TuiTdComponent","NgControl","TuiThGroupComponent","heads","heads$","TuiTableModule","NgModule","imports","CommonModule","PolymorpheusModule","TuiMapperPipeModule","TuiSvgModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IASrB,IAAIO,EAAW,WAQlB,OAPAA,EAAWN,OAAOO,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIN,KADTK,EAAIG,UAAUF,GACOV,OAAOc,UAAUT,eAAeU,KAAKN,EAAGL,KAAII,EAAEJ,GAAKK,EAAEL,IAE9E,OAAOI,IAEKQ,MAAMC,KAAML,YAezB,SAASM,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HxB,EAAvHyB,EAAIX,UAAUC,OAAQW,EAAID,EAAI,EAAIH,EAAkB,OAATE,EAAgBA,EAAOtB,OAAOyB,yBAAyBL,EAAQC,GAAOC,EACrH,GAAuB,iBAAZI,SAAoD,mBAArBA,QAAQC,SAAyBH,EAAIE,QAAQC,SAASR,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIZ,EAAIS,EAAWN,OAAS,EAAGH,GAAK,EAAGA,KAASZ,EAAIqB,EAAWT,MAAIc,GAAKD,EAAI,EAAIzB,EAAE0B,GAAKD,EAAI,EAAIzB,EAAEsB,EAAQC,EAAKG,GAAK1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************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n 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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {Directive, Inject, Input, TemplateRef} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: '[tuiCell]',\n})\nexport class TuiCellDirective {\n @Input()\n @tuiDefaultProp()\n tuiCell = '';\n\n constructor(@Inject(TemplateRef) readonly template: TemplateRef<{}>) {}\n}\n","import {Directive, Inject, Input, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[tuiHead]',\n})\nexport class TuiHeadDirective<T extends Record<any, any>> {\n @Input()\n tuiHead!: keyof T;\n\n constructor(@Inject(TemplateRef) readonly template: TemplateRef<{}>) {}\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {preventDefault, typedFromEvent} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\nimport {distinctUntilChanged, map, switchMap, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiResized]',\n})\nexport class TuiResizedDirective {\n @Output()\n readonly tuiResized = typedFromEvent(this.elementRef.nativeElement, 'mousedown').pipe(\n preventDefault(),\n switchMap(() => {\n const {width, right} = this.parentRef.nativeElement.getBoundingClientRect();\n\n return typedFromEvent(this.documentRef, 'mousemove').pipe(\n distinctUntilChanged(),\n map(({clientX}) => width + clientX - right),\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n );\n }),\n );\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_ELEMENT_REF)\n private readonly parentRef: ElementRef<HTMLTableHeaderCellElement>,\n ) {}\n}\n","import {Directive, Inject, Input, TemplateRef} from '@angular/core';\nimport {TuiRowContext} from '@taiga-ui/addon-table/interfaces';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'ng-template[tuiRow]',\n})\nexport class TuiRowDirective<T> {\n @Input()\n @tuiDefaultProp()\n tuiRowOf: readonly T[] = [];\n\n constructor(@Inject(TemplateRef) readonly template: TemplateRef<TuiRowContext<T>>) {}\n\n static ngTemplateContextGuard<T>(\n _dir: TuiRowDirective<T>,\n _ctx: any,\n ): _ctx is TuiRowContext<T> {\n return true;\n }\n}\n","import {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function stuckFactory(\n {nativeElement}: ElementRef,\n entries$: Observable<IntersectionObserverEntry[]>,\n): Observable<boolean> {\n const stream$ = entries$.pipe(map(([{intersectionRatio}]) => intersectionRatio < 1));\n\n nativeElement['$.class._stuck'] = stream$;\n\n return stream$;\n}\n\nexport const TUI_STUCK = new InjectionToken<boolean>('Stream of sticky stuck events');\n\nexport const TUI_STUCK_PROVIDER: Provider = {\n provide: TUI_STUCK,\n deps: [ElementRef, IntersectionObserverService],\n useFactory: stuckFactory,\n};\n","import {forwardRef, SkipSelf} from '@angular/core';\nimport {\n INTERSECTION_ROOT_MARGIN,\n INTERSECTION_THRESHOLD,\n IntersectionObserverService,\n} from '@ng-web-apis/intersection-observer';\nimport {\n MODE_PROVIDER,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TUI_TEXTFIELD_SIZE,\n} from '@taiga-ui/core';\nimport {TUI_INPUT_COUNT_OPTIONS, TuiInputCountOptions} from '@taiga-ui/kit';\n\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TUI_STUCK_PROVIDER} from './stuck.provider';\n\n// TODO: remove in ivy compilation\nexport const TABLE_THRESHOLD = [0, 1];\nexport const TABLE_LABEL = {\n labelOutside: true,\n};\n\nexport function inputCountOptionsFactory(\n options: TuiInputCountOptions,\n): TuiInputCountOptions {\n return {...options, hideButtons: true};\n}\n\nexport const TUI_TABLE_PROVIDERS = [\n {\n provide: INTERSECTION_ROOT_MARGIN,\n useValue: '10000px 10000px 10000px 0px',\n },\n {\n provide: INTERSECTION_THRESHOLD,\n useValue: TABLE_THRESHOLD,\n },\n {\n provide: TUI_TEXTFIELD_APPEARANCE,\n // TODO: remove in ivy compilation\n useValue: 'table', // TuiAppearance.Table\n },\n {\n provide: TUI_TEXTFIELD_LABEL_OUTSIDE,\n useValue: TABLE_LABEL,\n },\n {\n provide: TUI_INPUT_COUNT_OPTIONS,\n deps: [[new SkipSelf(), TUI_INPUT_COUNT_OPTIONS]],\n useFactory: inputCountOptionsFactory,\n },\n {\n provide: TUI_TEXTFIELD_SIZE,\n useExisting: forwardRef(() => TuiTableDirective),\n },\n IntersectionObserverService,\n MODE_PROVIDER,\n TUI_STUCK_PROVIDER,\n];\n","import {\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {TuiController, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TUI_MODE, TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_STUCK} from '../providers/stuck.provider';\nimport {TUI_TABLE_PROVIDERS} from '../providers/table.providers';\n\n@Directive({\n selector: 'table[tuiTable]',\n providers: TUI_TABLE_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '($.class._stuck)': 'stuck$',\n style: 'border-collapse: separate',\n },\n})\nexport class TuiTableDirective<T> extends TuiController {\n @Input()\n @tuiDefaultProp()\n columns: ReadonlyArray<keyof T | string> = [];\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n direction: -1 | 1 = 1;\n\n @Output()\n readonly directionChange = new EventEmitter<-1 | 1>();\n\n @Output()\n readonly sorterChange = new EventEmitter<TuiComparator<T> | null>();\n\n constructor(\n @Inject(IntersectionObserverService)\n readonly entries$: Observable<IntersectionObserverEntry[]>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_STUCK) readonly stuck$: Observable<boolean>,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n ) {\n super();\n }\n\n @Input()\n @tuiDefaultProp()\n sorter: TuiComparator<T> = () => 0;\n\n updateSorter(sorter: TuiComparator<T> | null) {\n if (this.sorter === sorter) {\n this.direction = this.direction === 1 ? -1 : 1;\n this.directionChange.emit(this.direction);\n } else {\n this.sorter = sorter || (() => 0);\n this.sorterChange.emit(this.sorter);\n this.direction = 1;\n this.directionChange.emit(1);\n }\n\n this.change$.next();\n }\n\n ngAfterViewInit() {\n this.changeDetectorRef.detectChanges();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {defaultSort} from '@taiga-ui/addon-table/utils';\nimport {tuiDefaultProp, TuiTableSortKeyException} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\n\nimport {TuiHeadDirective} from '../directives/head.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\n\n@Component({\n selector: 'th[tuiTh]',\n templateUrl: './th.template.html',\n styleUrls: ['./th.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_ELEMENT_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiThComponent<T> {\n @Input()\n @tuiDefaultProp()\n sorter: TuiComparator<T> | null = this.head\n ? (a, b) => defaultSort(a[this.key], b[this.key])\n : null;\n\n @Input()\n @tuiDefaultProp()\n resizable = false;\n\n @Input()\n @HostBinding('class._sticky')\n @tuiDefaultProp()\n sticky = false;\n\n @HostBinding('style.width.px')\n width: number | null = null;\n\n constructor(\n @Optional()\n @Inject(TuiHeadDirective)\n private readonly head: TuiHeadDirective<T> | null,\n @Optional()\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T> | null,\n ) {}\n\n get key(): keyof T {\n if (!this.head) {\n throw new TuiTableSortKeyException();\n }\n\n return this.head.tuiHead;\n }\n\n get isCurrent(): boolean {\n return !!this.sorter && !!this.table && this.sorter === this.table.sorter;\n }\n\n get icon(): string {\n return this.isCurrent ? 'tuiIconSortDown' : 'tuiIconSortOff';\n }\n\n onResized(width: number) {\n this.width = width;\n }\n}\n","import {Directive, DoCheck, Inject} from '@angular/core';\n\nimport {TuiThComponent} from '../th/th.component';\nimport {TuiSortByDirective} from './sort-by.directive';\nimport {TuiTableDirective} from './table.directive';\n\n@Directive({\n selector: 'th[tuiTh][tuiSortable]',\n})\nexport class TuiSortableDirective<T> implements DoCheck {\n constructor(\n @Inject(TuiSortByDirective) private readonly sortBy: TuiSortByDirective<T>,\n @Inject(TuiTableDirective) private readonly table: TuiTableDirective<T>,\n @Inject(TuiThComponent) private readonly th: TuiThComponent<T>,\n ) {\n this.th.sorter = this.sorter;\n }\n\n readonly sorter = () => 0;\n\n get key(): keyof T {\n return this.th.key;\n }\n\n ngDoCheck() {\n if (this.sortBy.tuiSortBy === this.key && this.table.sorter !== this.sorter) {\n this.table.updateSorter(this.sorter);\n }\n }\n}\n","import {\n ContentChildren,\n Directive,\n Inject,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {EMPTY_QUERY, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {filter, map} from 'rxjs/operators';\n\nimport {TuiSortableDirective} from './sortable.directive';\nimport {TuiTableDirective} from './table.directive';\n\n@Directive({\n selector: 'table[tuiTable][tuiSortBy]',\n})\nexport class TuiSortByDirective<T> {\n @ContentChildren(TuiSortableDirective, {descendants: true})\n private readonly sortables: QueryList<TuiSortableDirective<T>> = EMPTY_QUERY;\n\n @Input()\n @tuiDefaultProp()\n tuiSortBy: keyof T | string | null = null;\n\n @Output()\n readonly tuiSortByChange = this.table.sorterChange.pipe(\n filter(() => !!this.sortables.length),\n map(sorter => this.getKey(sorter)),\n );\n\n constructor(\n @Inject(TuiTableDirective) private readonly table: TuiTableDirective<T>,\n ) {}\n\n private getKey(sorter: TuiComparator<T> | null): keyof T | null {\n return this.sortables.find(s => s.sorter === sorter)?.key ?? null;\n }\n}\n","import {Directive, Inject} from '@angular/core';\nimport {\n INTERSECTION_ROOT_MARGIN,\n IntersectionObserverService,\n} from '@ng-web-apis/intersection-observer';\nimport {Observable} from 'rxjs';\n\nimport {TUI_STUCK, TUI_STUCK_PROVIDER} from '../providers/stuck.provider';\n\n@Directive({\n selector: 'thead[tuiThead]',\n providers: [\n TUI_STUCK_PROVIDER,\n IntersectionObserverService,\n {\n provide: INTERSECTION_ROOT_MARGIN,\n useValue: '0px 10000px 10000px 10000px',\n },\n ],\n host: {\n '($.class._stuck)': 'stuck$',\n },\n})\nexport class TuiTheadDirective {\n constructor(@Inject(TUI_STUCK) readonly stuck$: Observable<boolean>) {}\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiComparator} from '@taiga-ui/addon-table/types';\nimport {tuiPure} from '@taiga-ui/cdk';\n\nimport {TuiTableDirective} from '../directives/table.directive';\n\n@Pipe({\n name: 'tuiTableSort',\n pure: false,\n})\nexport class TuiTableSortPipe<T> implements PipeTransform {\n constructor(\n @Inject(TuiTableDirective) private readonly table: TuiTableDirective<T>,\n ) {}\n\n transform(data: readonly T[]): readonly T[] {\n return this.sort(data, this.table.sorter, this.table.direction);\n }\n\n @tuiPure\n private sort(\n data: readonly T[],\n sorter: TuiComparator<T>,\n direction: -1 | 1,\n ): readonly T[] {\n return [...data].sort((a, b) => direction * sorter(a, b));\n }\n}\n","import {ChangeDetectorRef, Provider, SkipSelf} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {watchedControllerFactory} from '@taiga-ui/core';\n\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TuiTableSortPipe} from '../pipes/table-sort.pipe';\n\n// TODO: remove in ivy compilation\nexport const TABLE_FACTORY = watchedControllerFactory;\n\nexport const TUI_TABLE_PROVIDER: Provider[] = [\n TuiDestroyService,\n TuiTableSortPipe,\n {\n provide: TuiTableDirective,\n deps: [[new SkipSelf(), TuiTableDirective], ChangeDetectorRef, TuiDestroyService],\n useFactory: TABLE_FACTORY,\n },\n];\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n forwardRef,\n Inject,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {TuiCellDirective} from '../directives/cell.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TUI_TABLE_PROVIDER} from '../providers/table.provider';\nimport {TuiTbodyComponent} from '../tbody/tbody.component';\n\n@Component({\n selector: 'tr[tuiTr]',\n templateUrl: './tr.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TUI_TABLE_PROVIDER],\n})\nexport class TuiTrComponent<T extends Record<string, any>> {\n @ContentChildren(forwardRef(() => TuiCellDirective))\n private readonly cells: QueryList<TuiCellDirective> = EMPTY_QUERY;\n\n readonly cells$ = this.cells.changes.pipe(\n startWith(null),\n map(() =>\n this.cells.reduce<Record<any, TuiCellDirective>>(\n (record, item) => ({...record, [item.tuiCell]: item}),\n {},\n ),\n ),\n );\n\n readonly item$ = this.body.rows.changes.pipe(\n startWith(null),\n map(\n () =>\n this.body.sorted[this.body.rows.toArray().findIndex(row => row === this)],\n ),\n );\n\n constructor(\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T>,\n @Inject(forwardRef(() => TuiTbodyComponent))\n private readonly body: TuiTbodyComponent<T>,\n ) {}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiRowDirective} from '../directives/row.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TuiTableSortPipe} from '../pipes/table-sort.pipe';\nimport {TUI_TABLE_PROVIDER} from '../providers/table.provider';\nimport {TuiTrComponent} from '../tr/tr.component';\n\n@Component({\n selector: 'tbody[tuiTbody]',\n templateUrl: './tbody.template.html',\n styleUrls: ['./tbody.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TABLE_PROVIDER,\n})\nexport class TuiTbodyComponent<T> {\n @Input()\n @tuiDefaultProp()\n data: readonly T[] = [];\n\n @Input()\n @tuiDefaultProp()\n heading: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n open = true;\n\n @Output()\n readonly openChange = new EventEmitter<boolean>();\n\n @ContentChild(forwardRef(() => TuiRowDirective))\n readonly row?: TuiRowDirective<T>;\n\n @ContentChildren(forwardRef(() => TuiTrComponent))\n readonly rows: QueryList<TuiTrComponent<T>> = EMPTY_QUERY;\n\n constructor(\n @Inject(TuiTableSortPipe) private readonly pipe: TuiTableSortPipe<T>,\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T>,\n ) {}\n\n get sorted(): readonly T[] {\n return this.pipe.transform(this.data);\n }\n\n readonly toContext = ($implicit: T, index: number) => ({$implicit, index});\n\n onClick() {\n this.open = !this.open;\n this.openChange.emit(this.open);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\n\n@Component({\n selector: 'th[tuiTd], td[tuiTd]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./td.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTdComponent {\n @HostBinding('class._editable')\n @ContentChild(NgControl)\n readonly control: unknown;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n Inject,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {TuiHeadDirective} from '../directives/head.directive';\nimport {TuiTableDirective} from '../directives/table.directive';\nimport {TUI_TABLE_PROVIDER} from '../providers/table.provider';\nimport {TuiThComponent} from '../th/th.component';\n\n@Component({\n selector: 'tr[tuiThGroup]',\n templateUrl: './th-group.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TUI_TABLE_PROVIDER],\n})\nexport class TuiThGroupComponent<T> {\n @ContentChild(forwardRef(() => TuiThComponent))\n readonly th: unknown;\n\n @ContentChildren(forwardRef(() => TuiHeadDirective))\n readonly heads: QueryList<TuiHeadDirective<T>> = EMPTY_QUERY;\n\n readonly heads$ = this.heads.changes.pipe(\n startWith(null),\n map(() =>\n this.heads.reduce<Record<any, TuiHeadDirective<T>>>(\n (record, item) => ({...record, [item.tuiHead]: item}),\n {},\n ),\n ),\n );\n\n constructor(\n @Inject(forwardRef(() => TuiTableDirective))\n readonly table: TuiTableDirective<T>,\n ) {}\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiCellDirective} from './directives/cell.directive';\nimport {TuiHeadDirective} from './directives/head.directive';\nimport {TuiResizedDirective} from './directives/resized.directive';\nimport {TuiRowDirective} from './directives/row.directive';\nimport {TuiSortByDirective} from './directives/sort-by.directive';\nimport {TuiSortableDirective} from './directives/sortable.directive';\nimport {TuiTableDirective} from './directives/table.directive';\nimport {TuiTheadDirective} from './directives/thead.directive';\nimport {TuiTableSortPipe} from './pipes/table-sort.pipe';\nimport {TuiTbodyComponent} from './tbody/tbody.component';\nimport {TuiTdComponent} from './td/td.component';\nimport {TuiThComponent} from './th/th.component';\nimport {TuiThGroupComponent} from './th-group/th-group.component';\nimport {TuiTrComponent} from './tr/tr.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule],\n declarations: [\n TuiTableDirective,\n TuiTbodyComponent,\n TuiThGroupComponent,\n TuiThComponent,\n TuiTdComponent,\n TuiTrComponent,\n TuiCellDirective,\n TuiHeadDirective,\n TuiRowDirective,\n TuiSortByDirective,\n TuiSortableDirective,\n TuiTheadDirective,\n TuiResizedDirective,\n TuiTableSortPipe,\n ],\n exports: [\n TuiTableDirective,\n TuiTbodyComponent,\n TuiThGroupComponent,\n TuiThComponent,\n TuiTdComponent,\n TuiTrComponent,\n TuiCellDirective,\n TuiHeadDirective,\n TuiRowDirective,\n TuiSortByDirective,\n TuiSortableDirective,\n TuiTheadDirective,\n TuiTableSortPipe,\n ],\n})\nexport class TuiTableModule {}\n"]}
@@ -0,0 +1,9 @@
1
+ import { TuiTableDirective } from './table.directive';
2
+ export declare class TuiSortByDirective<T> {
3
+ private readonly table;
4
+ private readonly sortables;
5
+ tuiSortBy: keyof T | string | null;
6
+ readonly tuiSortByChange: import("rxjs").Observable<keyof T | null>;
7
+ constructor(table: TuiTableDirective<T>);
8
+ private getKey;
9
+ }
@@ -0,0 +1,13 @@
1
+ import { DoCheck } from '@angular/core';
2
+ import { TuiThComponent } from '../th/th.component';
3
+ import { TuiSortByDirective } from './sort-by.directive';
4
+ import { TuiTableDirective } from './table.directive';
5
+ export declare class TuiSortableDirective<T> implements DoCheck {
6
+ private readonly sortBy;
7
+ private readonly table;
8
+ private readonly th;
9
+ constructor(sortBy: TuiSortByDirective<T>, table: TuiTableDirective<T>, th: TuiThComponent<T>);
10
+ readonly sorter: () => number;
11
+ get key(): keyof T;
12
+ ngDoCheck(): void;
13
+ }
@@ -15,6 +15,6 @@ export declare class TuiTableDirective<T> extends TuiController {
15
15
  readonly sorterChange: EventEmitter<TuiComparator<T> | null>;
16
16
  constructor(entries$: Observable<IntersectionObserverEntry[]>, mode$: Observable<TuiBrightness | null>, stuck$: Observable<boolean>, changeDetectorRef: ChangeDetectorRef);
17
17
  sorter: TuiComparator<T>;
18
- updateSorter(sorter: TuiComparator<T>): void;
18
+ updateSorter(sorter: TuiComparator<T> | null): void;
19
19
  ngAfterViewInit(): void;
20
20
  }
@@ -2,6 +2,8 @@ export * from './directives/cell.directive';
2
2
  export * from './directives/head.directive';
3
3
  export * from './directives/resized.directive';
4
4
  export * from './directives/row.directive';
5
+ export * from './directives/sort-by.directive';
6
+ export * from './directives/sortable.directive';
5
7
  export * from './directives/table.directive';
6
8
  export * from './directives/thead.directive';
7
9
  export * from './pipes/table-sort.pipe';