@taiga-ui/addon-table 3.54.0 → 3.55.0-canary.f5fbcc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-addon-table-components-table-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-components-table.umd.js +3 -3
- package/bundles/taiga-ui-addon-table-components-table.umd.js.map +1 -1
- package/esm2015/components/table/tbody/tbody.component.js +1 -1
- package/esm2015/components/table/td/td.component.js +1 -1
- package/esm2015/components/table/th/th.component.js +1 -1
- package/esm2015/components/table-pagination/table-pagination.options.js +1 -1
- package/fesm2015/taiga-ui-addon-table-components-table-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-components-table.js +3 -3
- package/fesm2015/taiga-ui-addon-table-components-table.js.map +1 -1
- package/package.json +34 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-table-components-table-pagination.umd.js","sources":["../../../projects/addon-table/components/table-pagination/table-pagination.options.ts","../../../projects/addon-table/components/table-pagination/table-pagination.component.ts","../../../projects/addon-table/components/table-pagination/table-pagination.template.html","../../../projects/addon-table/components/table-pagination/table-pagination.module.ts","../../../projects/addon-table/components/table-pagination/taiga-ui-addon-table-components-table-pagination.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {TuiContextWithImplicit, tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiTablePaginationOptions {\n readonly items: readonly number[];\n readonly showPages: boolean;\n readonly size: number;\n readonly sizeOptionContent: PolymorpheusContent<\n TuiContextWithImplicit<number> & {total: number}\n >;\n}\n\nfunction defaultSizeOptionContent({$implicit}: TuiContextWithImplicit<number>): string {\n return `${$implicit}`;\n}\n\nexport const TUI_TABLE_PAGINATION_DEFAULT_OPTIONS: TuiTablePaginationOptions = {\n sizeOptionContent: defaultSizeOptionContent,\n showPages: true,\n items: [10, 20, 50, 100],\n size: 10,\n};\n\n/**\n * Default parameters for TablePagination component\n */\nexport const TUI_TABLE_PAGINATION_OPTIONS = tuiCreateToken(\n TUI_TABLE_PAGINATION_DEFAULT_OPTIONS,\n);\n\nexport function tuiTablePaginationOptionsProvider(\n options: Partial<TuiTablePaginationOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_TABLE_PAGINATION_OPTIONS,\n options,\n TUI_TABLE_PAGINATION_DEFAULT_OPTIONS,\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {TUI_TABLE_PAGINATION_TEXTS} from '@taiga-ui/addon-table/tokens';\nimport {\n TUI_COMMON_ICONS,\n TUI_SPIN_ICONS,\n TUI_SPIN_TEXTS,\n TuiCommonIcons,\n TuiSpinIcons,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {\n TUI_TABLE_PAGINATION_OPTIONS,\n TuiTablePaginationOptions,\n} from './table-pagination.options';\n\nexport interface TuiTablePagination {\n readonly page: number;\n readonly size: number;\n}\n\n@Component({\n selector: 'tui-table-pagination',\n templateUrl: './table-pagination.template.html',\n styleUrls: ['./table-pagination.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTablePaginationComponent {\n @Input()\n items: readonly number[] = this.options.items;\n\n @Input()\n total = 0;\n\n @Input()\n page = 0;\n\n @Input()\n size = this.options.size;\n\n /**\n * TODO: Remove in 4.0\n * @deprecated use paginationChange\n */\n @Output()\n readonly pageChange = new EventEmitter<number>();\n\n /**\n * TODO: Remove in 4.0\n * @deprecated use paginationChange\n */\n @Output()\n readonly sizeChange = new EventEmitter<number>();\n\n @Output()\n readonly paginationChange = new EventEmitter<TuiTablePagination>();\n\n open = false;\n\n constructor(\n @Inject(TUI_SPIN_ICONS) readonly icons: TuiSpinIcons,\n @Inject(TUI_SPIN_TEXTS) readonly spinTexts$: Observable<[string, string]>,\n @Inject(TUI_TABLE_PAGINATION_TEXTS)\n readonly texts$: Observable<Record<'linesPerPage' | 'of' | 'pages', string>>,\n @Inject(TUI_TABLE_PAGINATION_OPTIONS) readonly options: TuiTablePaginationOptions,\n @Inject(TUI_COMMON_ICONS) readonly commonIcons: TuiCommonIcons,\n ) {}\n\n get pages(): number {\n return Math.ceil(this.total / this.size);\n }\n\n get start(): number {\n return this.page * this.size;\n }\n\n get end(): number {\n return Math.min(this.start + this.size, this.total);\n }\n\n get leftDisabled(): boolean {\n return !this.start;\n }\n\n get rightDisabled(): boolean {\n return this.end === this.total;\n }\n\n get pagination(): TuiTablePagination {\n return {\n page: this.page,\n size: this.size,\n };\n }\n\n onItem(size: number): void {\n const {start} = this;\n\n this.size = size;\n this.sizeChange.emit(size);\n this.open = false;\n this.page = Math.floor(start / this.size);\n this.pageChange.emit(this.page);\n this.paginationChange.emit(this.pagination);\n }\n\n back(): void {\n this.page--;\n this.pageChange.emit(this.page);\n this.paginationChange.emit(this.pagination);\n }\n\n forth(): void {\n this.page++;\n this.pageChange.emit(this.page);\n this.paginationChange.emit(this.pagination);\n }\n}\n","<ng-container *ngIf=\"texts$ | async as texts\">\n <span class=\"t-pages\">\n <ng-container *ngIf=\"options.showPages\">\n {{ texts.pages }}\n <strong class=\"t-strong\">{{ pages }}</strong>\n </ng-container>\n </span>\n <span automation-id=\"tui-table-pagination__lines-per-page-wrapper\">\n {{ texts.linesPerPage }}\n <tui-hosted-dropdown\n [content]=\"content\"\n [(open)]=\"open\"\n >\n <button\n tuiLink\n type=\"button\"\n >\n <strong>{{ start + 1 }}–{{ end }}</strong>\n </button>\n <ng-template #content>\n <tui-data-list size=\"s\">\n <ng-container *ngFor=\"let item of items\">\n <button\n tuiOption\n class=\"t-item\"\n (click)=\"onItem(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"\n options.sizeOptionContent as text;\n context: {$implicit: item, total: total}\n \"\n >\n {{ text }}\n </ng-container>\n <tui-svg\n *ngIf=\"item === size; else fakeIcon\"\n class=\"t-checkmark\"\n [src]=\"commonIcons.check\"\n ></tui-svg>\n\n <ng-template #fakeIcon>\n <span class=\"t-checkmark\"></span>\n </ng-template>\n </button>\n </ng-container>\n </tui-data-list>\n </ng-template>\n </tui-hosted-dropdown>\n {{ texts.of }}\n <strong class=\"t-strong\">{{ total }}</strong>\n </span>\n <ng-container *ngIf=\"spinTexts$ | async as spinTexts\">\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-back\"\n [disabled]=\"leftDisabled\"\n [icon]=\"icons.decrement\"\n [title]=\"spinTexts[0]\"\n (click)=\"back()\"\n ></button>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [disabled]=\"rightDisabled\"\n [icon]=\"icons.increment\"\n [title]=\"spinTexts[1]\"\n (click)=\"forth()\"\n ></button>\n </ng-container>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiButtonModule,\n TuiDataListModule,\n TuiHostedDropdownModule,\n TuiLinkModule,\n TuiSvgModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTablePaginationComponent} from './table-pagination.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiButtonModule,\n TuiLinkModule,\n TuiHostedDropdownModule,\n TuiDataListModule,\n TuiSvgModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTablePaginationComponent],\n exports: [TuiTablePaginationComponent],\n})\nexport class TuiTablePaginationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","EventEmitter","TUI_SPIN_ICONS","TUI_SPIN_TEXTS","TUI_TABLE_PAGINATION_TEXTS","TUI_COMMON_ICONS","i0","i1","i2","i3","Component","ChangeDetectionStrategy","Inject","Input","Output","CommonModule","TuiButtonModule","TuiLinkModule","TuiHostedDropdownModule","TuiDataListModule","TuiS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BACZC,kBAAe;4BACfC,gBAAa;4BACbC,0BAAuB;4BACvBC,oBAAiB;4BACjBC,eAAY;4BACZC,qBAAkB;IACrB,qBAAA;wBACD,YAAY,EAAE,CAAC,2BAA2B,CAAC;wBAC3C,OAAO,EAAE,CAAC,2BAA2B,CAAC;qBACzC,CAAA;;;ICzBD;;IAEG;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-table-components-table-pagination.umd.js","sources":["../../../projects/addon-table/components/table-pagination/table-pagination.options.ts","../../../projects/addon-table/components/table-pagination/table-pagination.component.ts","../../../projects/addon-table/components/table-pagination/table-pagination.template.html","../../../projects/addon-table/components/table-pagination/table-pagination.module.ts","../../../projects/addon-table/components/table-pagination/taiga-ui-addon-table-components-table-pagination.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {TuiContextWithImplicit, tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nfunction defaultSizeOptionContent({$implicit}: TuiContextWithImplicit<number>): string {\n return `${$implicit}`;\n}\n\nexport interface TuiTablePaginationOptions {\n readonly items: readonly number[];\n readonly showPages: boolean;\n readonly size: number;\n readonly sizeOptionContent: PolymorpheusContent<\n TuiContextWithImplicit<number> & {total: number}\n >;\n}\n\nexport const TUI_TABLE_PAGINATION_DEFAULT_OPTIONS: TuiTablePaginationOptions = {\n sizeOptionContent: defaultSizeOptionContent,\n showPages: true,\n items: [10, 20, 50, 100],\n size: 10,\n};\n\n/**\n * Default parameters for TablePagination component\n */\nexport const TUI_TABLE_PAGINATION_OPTIONS = tuiCreateToken(\n TUI_TABLE_PAGINATION_DEFAULT_OPTIONS,\n);\n\nexport function tuiTablePaginationOptionsProvider(\n options: Partial<TuiTablePaginationOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_TABLE_PAGINATION_OPTIONS,\n options,\n TUI_TABLE_PAGINATION_DEFAULT_OPTIONS,\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {TUI_TABLE_PAGINATION_TEXTS} from '@taiga-ui/addon-table/tokens';\nimport {\n TUI_COMMON_ICONS,\n TUI_SPIN_ICONS,\n TUI_SPIN_TEXTS,\n TuiCommonIcons,\n TuiSpinIcons,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {\n TUI_TABLE_PAGINATION_OPTIONS,\n TuiTablePaginationOptions,\n} from './table-pagination.options';\n\nexport interface TuiTablePagination {\n readonly page: number;\n readonly size: number;\n}\n\n@Component({\n selector: 'tui-table-pagination',\n templateUrl: './table-pagination.template.html',\n styleUrls: ['./table-pagination.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTablePaginationComponent {\n @Input()\n items: readonly number[] = this.options.items;\n\n @Input()\n total = 0;\n\n @Input()\n page = 0;\n\n @Input()\n size = this.options.size;\n\n /**\n * TODO: Remove in 4.0\n * @deprecated use paginationChange\n */\n @Output()\n readonly pageChange = new EventEmitter<number>();\n\n /**\n * TODO: Remove in 4.0\n * @deprecated use paginationChange\n */\n @Output()\n readonly sizeChange = new EventEmitter<number>();\n\n @Output()\n readonly paginationChange = new EventEmitter<TuiTablePagination>();\n\n open = false;\n\n constructor(\n @Inject(TUI_SPIN_ICONS) readonly icons: TuiSpinIcons,\n @Inject(TUI_SPIN_TEXTS) readonly spinTexts$: Observable<[string, string]>,\n @Inject(TUI_TABLE_PAGINATION_TEXTS)\n readonly texts$: Observable<Record<'linesPerPage' | 'of' | 'pages', string>>,\n @Inject(TUI_TABLE_PAGINATION_OPTIONS) readonly options: TuiTablePaginationOptions,\n @Inject(TUI_COMMON_ICONS) readonly commonIcons: TuiCommonIcons,\n ) {}\n\n get pages(): number {\n return Math.ceil(this.total / this.size);\n }\n\n get start(): number {\n return this.page * this.size;\n }\n\n get end(): number {\n return Math.min(this.start + this.size, this.total);\n }\n\n get leftDisabled(): boolean {\n return !this.start;\n }\n\n get rightDisabled(): boolean {\n return this.end === this.total;\n }\n\n get pagination(): TuiTablePagination {\n return {\n page: this.page,\n size: this.size,\n };\n }\n\n onItem(size: number): void {\n const {start} = this;\n\n this.size = size;\n this.sizeChange.emit(size);\n this.open = false;\n this.page = Math.floor(start / this.size);\n this.pageChange.emit(this.page);\n this.paginationChange.emit(this.pagination);\n }\n\n back(): void {\n this.page--;\n this.pageChange.emit(this.page);\n this.paginationChange.emit(this.pagination);\n }\n\n forth(): void {\n this.page++;\n this.pageChange.emit(this.page);\n this.paginationChange.emit(this.pagination);\n }\n}\n","<ng-container *ngIf=\"texts$ | async as texts\">\n <span class=\"t-pages\">\n <ng-container *ngIf=\"options.showPages\">\n {{ texts.pages }}\n <strong class=\"t-strong\">{{ pages }}</strong>\n </ng-container>\n </span>\n <span automation-id=\"tui-table-pagination__lines-per-page-wrapper\">\n {{ texts.linesPerPage }}\n <tui-hosted-dropdown\n [content]=\"content\"\n [(open)]=\"open\"\n >\n <button\n tuiLink\n type=\"button\"\n >\n <strong>{{ start + 1 }}–{{ end }}</strong>\n </button>\n <ng-template #content>\n <tui-data-list size=\"s\">\n <ng-container *ngFor=\"let item of items\">\n <button\n tuiOption\n class=\"t-item\"\n (click)=\"onItem(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"\n options.sizeOptionContent as text;\n context: {$implicit: item, total: total}\n \"\n >\n {{ text }}\n </ng-container>\n <tui-svg\n *ngIf=\"item === size; else fakeIcon\"\n class=\"t-checkmark\"\n [src]=\"commonIcons.check\"\n ></tui-svg>\n\n <ng-template #fakeIcon>\n <span class=\"t-checkmark\"></span>\n </ng-template>\n </button>\n </ng-container>\n </tui-data-list>\n </ng-template>\n </tui-hosted-dropdown>\n {{ texts.of }}\n <strong class=\"t-strong\">{{ total }}</strong>\n </span>\n <ng-container *ngIf=\"spinTexts$ | async as spinTexts\">\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-back\"\n [disabled]=\"leftDisabled\"\n [icon]=\"icons.decrement\"\n [title]=\"spinTexts[0]\"\n (click)=\"back()\"\n ></button>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [disabled]=\"rightDisabled\"\n [icon]=\"icons.increment\"\n [title]=\"spinTexts[1]\"\n (click)=\"forth()\"\n ></button>\n </ng-container>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiButtonModule,\n TuiDataListModule,\n TuiHostedDropdownModule,\n TuiLinkModule,\n TuiSvgModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTablePaginationComponent} from './table-pagination.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiButtonModule,\n TuiLinkModule,\n TuiHostedDropdownModule,\n TuiDataListModule,\n TuiSvgModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTablePaginationComponent],\n exports: [TuiTablePaginationComponent],\n})\nexport class TuiTablePaginationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tuiCreateToken","tuiProvideOptions","EventEmitter","TUI_SPIN_ICONS","TUI_SPIN_TEXTS","TUI_TABLE_PAGINATION_TEXTS","TUI_COMMON_ICONS","i0","i1","i2","i3","Component","ChangeDetectionStrategy","Inject","Input","Output","CommonModule","TuiButtonModule","TuiLinkModule","TuiHostedDropdownModule","TuiDataListModule","TuiSvgModule","PolymorpheusModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIA,SAAS,wBAAwB,CAAC,EAA2C,EAAA;IAA1C,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,CAAA;QACxC,OAAO,EAAA,GAAG,SAAW,CAAC;IAC1B,CAAC;AAWY,QAAA,oCAAoC,GAA8B;IAC3E,IAAA,iBAAiB,EAAE,wBAAwB;IAC3C,IAAA,SAAS,EAAE,IAAI;QACf,KAAK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.ElementRef,
|
|
722
722
|
},
|
|
723
|
-
], ngImport: i0__namespace, template: "<button\n *ngIf=\"sorter && table; else content\"\n type=\"button\"\n class=\"t-sort\"\n [class.t-sort_sorted]=\"isCurrent\"\n (click)=\"updateSorterAndDirection()\"\n>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n {{ table.change$ | async }}\n <tui-svg\n class=\"t-sort-icon\"\n [src]=\"icon\"\n ></tui-svg>\n</button>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n<div\n *ngIf=\"resizable\"\n class=\"t-bar\"\n (tuiResized)=\"onResized($event)\"\n></div>\n", styles: [":host{transition-property:box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;top:0;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;font-weight:bold;color:var(--tui-text-02);background:var(--tui-base-01);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem #ededed00;border:1px solid var(--tui-base-04);filter:opacity(1)}:host:not(:first-child){border-left:none}:host._sticky,:host-context(._stuck) :host._sticky{position:-webkit-sticky;position:sticky;z-index:30}:host._sticky:first-child,:host-context(._stuck) :host._sticky:first-child{left:0}:host._sticky:after,:host-context(._stuck) :host._sticky:after{transition-property:opacity;transition-duration:var(--tui-duration, .3s);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(._stuck) :host{z-index:20}: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:bold;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 #edededb3}: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 #3c3c3ce6}:host-context(table[data-mode=\"onDark\"] thead[tuiThead]._stuck):first-child{box-shadow:.0625rem .3125rem #3c3c3ce6}: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, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;display:inline-flex;flex-direction:inherit;align-items:center;outline:none;font-weight:bold;cursor:pointer}.t-sort_sorted{color:var(--tui-text-01)}.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, .3s);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:hover,.t-bar:active{opacity:1}\n"], components: [{ type: i1__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: TuiResizedDirective, selector: "[tuiResized]", outputs: ["tuiResized"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
723
|
+
], ngImport: i0__namespace, template: "<button\n *ngIf=\"sorter && table; else content\"\n type=\"button\"\n class=\"t-sort\"\n [class.t-sort_sorted]=\"isCurrent\"\n (click)=\"updateSorterAndDirection()\"\n>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n {{ table.change$ | async }}\n <tui-svg\n class=\"t-sort-icon\"\n [src]=\"icon\"\n ></tui-svg>\n</button>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n<div\n *ngIf=\"resizable\"\n class=\"t-bar\"\n (tuiResized)=\"onResized($event)\"\n></div>\n", styles: [":host{transition-property:box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;top:0;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;font-weight:bold;color:var(--tui-text-02);background:var(--tui-base-01);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem #ededed00;border:1px solid var(--tui-base-04);filter:opacity(1)}@supports (-webkit-hyphens: none){:host{transform:translate(0)}}:host:not(:first-child){border-left:none}:host._sticky,:host-context(._stuck) :host._sticky{position:-webkit-sticky;position:sticky;z-index:30}:host._sticky:first-child,:host-context(._stuck) :host._sticky:first-child{left:0}:host._sticky:after,:host-context(._stuck) :host._sticky:after{transition-property:opacity;transition-duration:var(--tui-duration, .3s);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(._stuck) :host{z-index:20}: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:bold;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 #edededb3}: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 #3c3c3ce6}:host-context(table[data-mode=\"onDark\"] thead[tuiThead]._stuck):first-child{box-shadow:.0625rem .3125rem #3c3c3ce6}: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, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;display:inline-flex;flex-direction:inherit;align-items:center;outline:none;font-weight:bold;cursor:pointer}.t-sort_sorted{color:var(--tui-text-01)}.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, .3s);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:hover,.t-bar:active{opacity:1}\n"], components: [{ type: i1__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: TuiResizedDirective, selector: "[tuiResized]", outputs: ["tuiResized"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
724
724
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThComponent, decorators: [{
|
|
725
725
|
type: i0.Component,
|
|
726
726
|
args: [{
|
|
@@ -935,7 +935,7 @@
|
|
|
935
935
|
return TuiTdComponent;
|
|
936
936
|
}());
|
|
937
937
|
TuiTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTdComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
938
|
-
TuiTdComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTdComponent, selector: "th[tuiTd], td[tuiTd]", host: { properties: { "class._editable": "this.control" } }, queries: [{ propertyName: "control", first: true, predicate: forms.NgControl, descendants: true }], ngImport: i0__namespace, template: "\n <ng-content></ng-content>\n ", isInline: true, 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;filter:opacity(1)}: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, .3s);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}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
938
|
+
TuiTdComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTdComponent, selector: "th[tuiTd], td[tuiTd]", host: { properties: { "class._editable": "this.control" } }, queries: [{ propertyName: "control", first: true, predicate: forms.NgControl, descendants: true }], ngImport: i0__namespace, template: "\n <ng-content></ng-content>\n ", isInline: true, 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;filter:opacity(1)}@supports (-webkit-hyphens: none){:host{transform:translate(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, .3s);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}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
939
939
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTdComponent, decorators: [{
|
|
940
940
|
type: i0.Component,
|
|
941
941
|
args: [{
|
|
@@ -1034,7 +1034,7 @@
|
|
|
1034
1034
|
return TuiTbodyComponent;
|
|
1035
1035
|
}());
|
|
1036
1036
|
TuiTbodyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTbodyComponent, deps: [{ token: TuiTableSortPipe }, { token: TUI_TABLE_OPTIONS }, { token: kit.TUI_ARROW_OPTIONS }, { token: i0.forwardRef(function () { return TuiTableDirective; }) }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1037
|
-
TuiTbodyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTbodyComponent, selector: "tbody[tuiTbody]", inputs: { data: "data", heading: "heading", open: "open" }, outputs: { openChange: "openChange" }, providers: TUI_TABLE_PROVIDER, queries: [{ propertyName: "row", first: true, predicate: i0__namespace.forwardRef(function () { return TuiRowDirective; }), descendants: true }, { propertyName: "rows", predicate: i0__namespace.forwardRef(function () { return TuiTrComponent; }) }], ngImport: i0__namespace, template: "<tr *ngIf=\"heading\">\n <th\n class=\"t-heading\"\n [colSpan]=\"table.columns.length\"\n >\n <button\n type=\"button\"\n class=\"t-expand\"\n (click)=\"onClick()\"\n >\n <span class=\"t-name\">\n <ng-container *polymorpheusOutlet=\"heading as text\">\n {{ text }}\n </ng-container>\n </span>\n <tui-svg\n class=\"t-chevron\"\n [class.t-chevron_rotated]=\"open\"\n [src]=\"arrowOptions.iconLarge\"\n ></tui-svg>\n </button>\n </th>\n</tr>\n<ng-container *ngIf=\"open\">\n <ng-content></ng-content>\n</ng-container>\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", styles: [":host{border-color:var(--tui-base-04)}:host tr{border-color:inherit}.t-expand{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;display:flex;width:100%;height:100%;align-items:center;box-sizing:border-box;outline:none;font-weight:bold;cursor:pointer;border-color:inherit}.t-expand:focus-visible .t-name{background:var(--tui-selection)}.t-expand:before,.t-expand:after{content:\"\";position:-webkit-sticky;position:sticky;height:100%;border-left:1px solid;border-color:inherit}.t-expand:before{left:0}.t-expand:after{right:0}.t-heading{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;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}.t-heading:hover{background:var(--tui-base-03)}:host-context(table[data-size=\"l\"]) .t-heading{font:var(--tui-font-text-m);height:var(--tui-height-l)}.t-name{position:-webkit-sticky;position:sticky;left:.75rem;display:inline-block}:host-context(table[data-size=\"l\"]) .t-name{left:1rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;right:.75rem;margin:0 .6875rem 0 auto}.t-chevron_rotated{transform:rotate(180deg)}\n"], components: [{ type: i1__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiMapper": i4__namespace.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1037
|
+
TuiTbodyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTbodyComponent, selector: "tbody[tuiTbody]", inputs: { data: "data", heading: "heading", open: "open" }, outputs: { openChange: "openChange" }, providers: TUI_TABLE_PROVIDER, queries: [{ propertyName: "row", first: true, predicate: i0__namespace.forwardRef(function () { return TuiRowDirective; }), descendants: true }, { propertyName: "rows", predicate: i0__namespace.forwardRef(function () { return TuiTrComponent; }) }], ngImport: i0__namespace, template: "<tr *ngIf=\"heading\">\n <th\n class=\"t-heading\"\n [colSpan]=\"table.columns.length\"\n >\n <button\n type=\"button\"\n class=\"t-expand\"\n (click)=\"onClick()\"\n >\n <span class=\"t-name\">\n <ng-container *polymorpheusOutlet=\"heading as text\">\n {{ text }}\n </ng-container>\n </span>\n <tui-svg\n class=\"t-chevron\"\n [class.t-chevron_rotated]=\"open\"\n [src]=\"arrowOptions.iconLarge\"\n ></tui-svg>\n </button>\n </th>\n</tr>\n<ng-container *ngIf=\"open\">\n <ng-content></ng-content>\n</ng-container>\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", styles: [":host{border-color:var(--tui-base-04)}:host tr{border-color:inherit}.t-expand{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;display:flex;width:100%;height:100%;align-items:center;box-sizing:border-box;outline:none;font-weight:bold;cursor:pointer;border-color:inherit}.t-expand:focus-visible .t-name{background:var(--tui-selection)}.t-expand:before,.t-expand:after{content:\"\";position:-webkit-sticky;position:sticky;height:100%;border-left:1px solid;border-color:inherit}.t-expand:before{left:0}.t-expand:after{right:0}.t-heading{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;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}.t-heading:hover{background:var(--tui-base-03)}:host-context(table[data-size=\"l\"]) .t-heading{font:var(--tui-font-text-m);height:var(--tui-height-l)}.t-name{position:-webkit-sticky;position:sticky;left:.75rem;display:inline-block}:host-context(table[data-size=\"l\"]) .t-name{left:1rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;right:.75rem;margin:0 .6875rem 0 auto}.t-chevron_rotated{transform:rotate(180deg)}\n"], components: [{ type: i1__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiMapper": i4__namespace.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1038
1038
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTbodyComponent, decorators: [{
|
|
1039
1039
|
type: i0.Component,
|
|
1040
1040
|
args: [{
|