@taiga-ui/addon-table 2.59.1 → 3.0.0-rc.1
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-reorder.umd.js +422 -297
- package/bundles/taiga-ui-addon-table-components-reorder.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-components-table-pagination.umd.js +445 -314
- package/bundles/taiga-ui-addon-table-components-table-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-components-table.umd.js +863 -659
- package/bundles/taiga-ui-addon-table-components-table.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-components.umd.js +11 -25
- package/bundles/taiga-ui-addon-table-components.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-directives-table-filters.umd.js +453 -320
- package/bundles/taiga-ui-addon-table-directives-table-filters.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-directives.umd.js +5 -7
- package/bundles/taiga-ui-addon-table-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-interfaces.umd.js +2 -2
- package/bundles/taiga-ui-addon-table-interfaces.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-tokens.umd.js +9 -5
- package/bundles/taiga-ui-addon-table-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-types.umd.js +2 -2
- package/bundles/taiga-ui-addon-table-types.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table-utils.umd.js +9 -11
- package/bundles/taiga-ui-addon-table-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-table.umd.js +19 -21
- package/bundles/taiga-ui-addon-table.umd.js.map +1 -1
- package/components/index.d.ts +0 -1
- package/components/package.json +2 -5
- package/components/reorder/package.json +2 -5
- package/components/reorder/reorder.component.d.ts +3 -0
- package/components/reorder/reorder.module.d.ts +9 -0
- package/components/reorder/taiga-ui-addon-table-components-reorder.d.ts +1 -0
- package/components/table/directives/cell.directive.d.ts +3 -0
- package/components/table/directives/head.directive.d.ts +3 -0
- package/components/table/directives/resized.directive.d.ts +3 -0
- package/components/table/directives/row.directive.d.ts +3 -0
- package/components/table/directives/sort-by.directive.d.ts +3 -0
- package/components/table/directives/sortable.directive.d.ts +3 -0
- package/components/table/directives/table.directive.d.ts +5 -2
- package/components/table/directives/thead.directive.d.ts +3 -0
- package/components/table/package.json +2 -5
- package/components/table/pipes/table-sort.pipe.d.ts +3 -0
- package/components/table/providers/stuck.provider.d.ts +1 -3
- package/components/table/providers/table.provider.d.ts +0 -2
- package/components/table/providers/table.providers.d.ts +0 -6
- package/components/table/table.module.d.ts +22 -0
- package/components/table/taiga-ui-addon-table-components-table.d.ts +1 -0
- package/components/table/tbody/tbody.component.d.ts +3 -0
- package/components/table/td/td.component.d.ts +3 -0
- package/components/table/th/th.component.d.ts +3 -0
- package/components/table/th-group/th-group.component.d.ts +3 -0
- package/components/table/tr/tr.component.d.ts +3 -0
- package/components/table-pagination/package.json +2 -5
- package/components/table-pagination/table-pagination.component.d.ts +3 -0
- package/components/table-pagination/table-pagination.module.d.ts +8 -0
- package/components/table-pagination/taiga-ui-addon-table-components-table-pagination.d.ts +1 -0
- package/components/taiga-ui-addon-table-components.d.ts +1 -0
- package/directives/package.json +2 -5
- package/directives/table-filters/generic-filter.directive.d.ts +3 -0
- package/directives/table-filters/package.json +2 -5
- package/directives/table-filters/table-filter.directive.d.ts +3 -0
- package/directives/table-filters/table-filters.directive.d.ts +3 -0
- package/directives/table-filters/table-filters.module.d.ts +8 -0
- package/directives/table-filters/table-filters.pipe.d.ts +3 -0
- package/directives/table-filters/taiga-ui-addon-table-directives-table-filters.d.ts +1 -0
- package/directives/taiga-ui-addon-table-directives.d.ts +1 -0
- package/esm2015/components/index.js +1 -2
- package/esm2015/components/reorder/index.js +1 -1
- package/esm2015/components/reorder/reorder.component.js +34 -28
- package/esm2015/components/reorder/reorder.module.js +26 -13
- package/esm2015/components/reorder/taiga-ui-addon-table-components-reorder.js +1 -1
- package/esm2015/components/table/directives/cell.directive.js +18 -15
- package/esm2015/components/table/directives/head.directive.js +17 -17
- package/esm2015/components/table/directives/resized.directive.js +26 -25
- package/esm2015/components/table/directives/row.directive.js +18 -15
- package/esm2015/components/table/directives/sort-by.directive.js +26 -23
- package/esm2015/components/table/directives/sortable.directive.js +24 -18
- package/esm2015/components/table/directives/table.directive.js +48 -39
- package/esm2015/components/table/directives/thead.directive.js +33 -25
- package/esm2015/components/table/index.js +1 -1
- package/esm2015/components/table/pipes/table-sort.pipe.js +18 -15
- package/esm2015/components/table/providers/stuck.provider.js +6 -8
- package/esm2015/components/table/providers/table.provider.js +3 -5
- package/esm2015/components/table/providers/table.providers.js +7 -15
- package/esm2015/components/table/table.module.js +69 -41
- package/esm2015/components/table/taiga-ui-addon-table-components-table.js +1 -1
- package/esm2015/components/table/tbody/tbody.component.js +43 -32
- package/esm2015/components/table/td/td.component.js +23 -17
- package/esm2015/components/table/th/th.component.js +56 -36
- package/esm2015/components/table/th-group/th-group.component.js +27 -23
- package/esm2015/components/table/tr/tr.component.js +28 -22
- package/esm2015/components/table-pagination/index.js +1 -1
- package/esm2015/components/table-pagination/table-pagination-options.js +1 -1
- package/esm2015/components/table-pagination/table-pagination.component.js +40 -32
- package/esm2015/components/table-pagination/table-pagination.module.js +30 -13
- package/esm2015/components/table-pagination/taiga-ui-addon-table-components-table-pagination.js +1 -1
- package/esm2015/components/taiga-ui-addon-table-components.js +1 -1
- package/esm2015/directives/index.js +1 -1
- package/esm2015/directives/table-filters/abstract-table-filter.js +1 -1
- package/esm2015/directives/table-filters/generic-filter.directive.js +25 -20
- package/esm2015/directives/table-filters/index.js +2 -1
- package/esm2015/directives/table-filters/table-filter.directive.js +32 -24
- package/esm2015/directives/table-filters/table-filter.js +2 -1
- package/esm2015/directives/table-filters/table-filters.directive.js +12 -10
- package/esm2015/directives/table-filters/table-filters.module.js +30 -21
- package/esm2015/directives/table-filters/table-filters.pipe.js +16 -14
- package/esm2015/directives/table-filters/taiga-ui-addon-table-directives-table-filters.js +1 -1
- package/esm2015/directives/taiga-ui-addon-table-directives.js +1 -1
- package/esm2015/index.js +2 -1
- package/esm2015/interfaces/index.js +2 -1
- package/esm2015/interfaces/row-context.js +2 -1
- package/esm2015/interfaces/taiga-ui-addon-table-interfaces.js +2 -1
- package/esm2015/taiga-ui-addon-table.js +1 -1
- package/esm2015/tokens/i18n.js +4 -4
- package/esm2015/tokens/index.js +1 -1
- package/esm2015/tokens/taiga-ui-addon-table-tokens.js +1 -1
- package/esm2015/types/comparator.js +2 -1
- package/esm2015/types/index.js +2 -1
- package/esm2015/types/taiga-ui-addon-table-types.js +2 -1
- package/esm2015/utils/default-sort.js +4 -9
- package/esm2015/utils/index.js +1 -1
- package/esm2015/utils/taiga-ui-addon-table-utils.js +1 -1
- package/fesm2015/taiga-ui-addon-table-components-reorder.js +59 -38
- package/fesm2015/taiga-ui-addon-table-components-reorder.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-components-table-pagination.js +68 -41
- package/fesm2015/taiga-ui-addon-table-components-table-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-components-table.js +436 -347
- package/fesm2015/taiga-ui-addon-table-components-table.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-components.js +0 -1
- package/fesm2015/taiga-ui-addon-table-components.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-directives-table-filters.js +104 -76
- package/fesm2015/taiga-ui-addon-table-directives-table-filters.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-directives.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-interfaces.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-tokens.js +3 -3
- package/fesm2015/taiga-ui-addon-table-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-types.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table-utils.js +4 -9
- package/fesm2015/taiga-ui-addon-table-utils.js.map +1 -1
- package/fesm2015/taiga-ui-addon-table.js +1 -0
- package/fesm2015/taiga-ui-addon-table.js.map +1 -1
- package/interfaces/package.json +2 -5
- package/interfaces/taiga-ui-addon-table-interfaces.d.ts +1 -0
- package/package.json +12 -15
- package/taiga-ui-addon-table.d.ts +1 -0
- package/tokens/package.json +2 -5
- package/tokens/taiga-ui-addon-table-tokens.d.ts +1 -0
- package/types/package.json +2 -5
- package/types/taiga-ui-addon-table-types.d.ts +1 -0
- package/utils/default-sort.d.ts +1 -5
- package/utils/package.json +2 -5
- package/utils/taiga-ui-addon-table-utils.d.ts +1 -0
- package/bundles/taiga-ui-addon-table-components-reorder.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-components-reorder.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-components-resizable-column.umd.js +0 -338
- package/bundles/taiga-ui-addon-table-components-resizable-column.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-table-components-resizable-column.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-components-resizable-column.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-components-table-pagination.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-components-table-pagination.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-components-table.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-components-table.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-components.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-components.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-directives-table-filters.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-directives-table-filters.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-directives.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-directives.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-interfaces.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-interfaces.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-tokens.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-tokens.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-types.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-types.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table-utils.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table-utils.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-table.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-table.umd.min.js.map +0 -1
- package/components/reorder/taiga-ui-addon-table-components-reorder.metadata.json +0 -1
- package/components/resizable-column/index.d.ts +0 -3
- package/components/resizable-column/package.json +0 -13
- package/components/resizable-column/resizable-column.component.d.ts +0 -5
- package/components/resizable-column/resizable-column.directive.d.ts +0 -9
- package/components/resizable-column/resizable-column.module.d.ts +0 -3
- package/components/resizable-column/taiga-ui-addon-table-components-resizable-column.d.ts +0 -4
- package/components/resizable-column/taiga-ui-addon-table-components-resizable-column.metadata.json +0 -1
- package/components/table/taiga-ui-addon-table-components-table.metadata.json +0 -1
- package/components/table-pagination/taiga-ui-addon-table-components-table-pagination.metadata.json +0 -1
- package/components/taiga-ui-addon-table-components.metadata.json +0 -1
- package/directives/table-filters/taiga-ui-addon-table-directives-table-filters.metadata.json +0 -1
- package/directives/taiga-ui-addon-table-directives.metadata.json +0 -1
- package/esm2015/components/resizable-column/index.js +0 -4
- package/esm2015/components/resizable-column/resizable-column.component.js +0 -30
- package/esm2015/components/resizable-column/resizable-column.directive.js +0 -37
- package/esm2015/components/resizable-column/resizable-column.module.js +0 -15
- package/esm2015/components/resizable-column/taiga-ui-addon-table-components-resizable-column.js +0 -5
- package/esm5/components/index.js +0 -5
- package/esm5/components/reorder/index.js +0 -3
- package/esm5/components/reorder/reorder.component.js +0 -72
- package/esm5/components/reorder/reorder.module.js +0 -27
- package/esm5/components/reorder/taiga-ui-addon-table-components-reorder.js +0 -5
- package/esm5/components/resizable-column/index.js +0 -4
- package/esm5/components/resizable-column/resizable-column.component.js +0 -31
- package/esm5/components/resizable-column/resizable-column.directive.js +0 -42
- package/esm5/components/resizable-column/resizable-column.module.js +0 -18
- package/esm5/components/resizable-column/taiga-ui-addon-table-components-resizable-column.js +0 -5
- package/esm5/components/table/directives/cell.directive.js +0 -25
- package/esm5/components/table/directives/head.directive.js +0 -22
- package/esm5/components/table/directives/resized.directive.js +0 -41
- package/esm5/components/table/directives/row.directive.js +0 -28
- package/esm5/components/table/directives/sort-by.directive.js +0 -41
- package/esm5/components/table/directives/sortable.directive.js +0 -52
- package/esm5/components/table/directives/table.directive.js +0 -88
- package/esm5/components/table/directives/thead.directive.js +0 -33
- package/esm5/components/table/index.js +0 -19
- package/esm5/components/table/pipes/table-sort.pipe.js +0 -31
- package/esm5/components/table/providers/stuck.provider.js +0 -21
- package/esm5/components/table/providers/table.provider.js +0 -17
- package/esm5/components/table/providers/table.providers.js +0 -48
- package/esm5/components/table/table.module.js +0 -63
- package/esm5/components/table/taiga-ui-addon-table-components-table.js +0 -5
- package/esm5/components/table/tbody/tbody.component.js +0 -70
- package/esm5/components/table/td/td.component.js +0 -22
- package/esm5/components/table/th/th.component.js +0 -88
- package/esm5/components/table/th-group/th-group.component.js +0 -42
- package/esm5/components/table/tr/tr.component.js +0 -45
- package/esm5/components/table-pagination/index.js +0 -4
- package/esm5/components/table-pagination/table-pagination-options.js +0 -17
- package/esm5/components/table-pagination/table-pagination.component.js +0 -113
- package/esm5/components/table-pagination/table-pagination.module.js +0 -28
- package/esm5/components/table-pagination/taiga-ui-addon-table-components-table-pagination.js +0 -5
- package/esm5/components/taiga-ui-addon-table-components.js +0 -5
- package/esm5/directives/index.js +0 -2
- package/esm5/directives/table-filters/abstract-table-filter.js +0 -7
- package/esm5/directives/table-filters/generic-filter.directive.js +0 -34
- package/esm5/directives/table-filters/index.js +0 -7
- package/esm5/directives/table-filters/table-filter.directive.js +0 -59
- package/esm5/directives/table-filters/table-filter.js +0 -1
- package/esm5/directives/table-filters/table-filters.directive.js +0 -39
- package/esm5/directives/table-filters/table-filters.module.js +0 -29
- package/esm5/directives/table-filters/table-filters.pipe.js +0 -23
- package/esm5/directives/table-filters/taiga-ui-addon-table-directives-table-filters.js +0 -5
- package/esm5/directives/taiga-ui-addon-table-directives.js +0 -5
- package/esm5/index.js +0 -5
- package/esm5/interfaces/index.js +0 -1
- package/esm5/interfaces/row-context.js +0 -1
- package/esm5/interfaces/taiga-ui-addon-table-interfaces.js +0 -4
- package/esm5/taiga-ui-addon-table.js +0 -5
- package/esm5/tokens/i18n.js +0 -9
- package/esm5/tokens/index.js +0 -2
- package/esm5/tokens/taiga-ui-addon-table-tokens.js +0 -5
- package/esm5/types/comparator.js +0 -1
- package/esm5/types/index.js +0 -1
- package/esm5/types/taiga-ui-addon-table-types.js +0 -4
- package/esm5/utils/default-sort.js +0 -18
- package/esm5/utils/index.js +0 -2
- package/esm5/utils/taiga-ui-addon-table-utils.js +0 -5
- package/fesm2015/taiga-ui-addon-table-components-resizable-column.js +0 -79
- package/fesm2015/taiga-ui-addon-table-components-resizable-column.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-components-reorder.js +0 -99
- package/fesm5/taiga-ui-addon-table-components-reorder.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-components-resizable-column.js +0 -88
- package/fesm5/taiga-ui-addon-table-components-resizable-column.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-components-table-pagination.js +0 -156
- package/fesm5/taiga-ui-addon-table-components-table-pagination.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-components-table.js +0 -669
- package/fesm5/taiga-ui-addon-table-components-table.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-components.js +0 -9
- package/fesm5/taiga-ui-addon-table-components.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-directives-table-filters.js +0 -174
- package/fesm5/taiga-ui-addon-table-directives-table-filters.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-directives.js +0 -6
- package/fesm5/taiga-ui-addon-table-directives.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-interfaces.js +0 -4
- package/fesm5/taiga-ui-addon-table-interfaces.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-tokens.js +0 -16
- package/fesm5/taiga-ui-addon-table-tokens.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-types.js +0 -4
- package/fesm5/taiga-ui-addon-table-types.js.map +0 -1
- package/fesm5/taiga-ui-addon-table-utils.js +0 -25
- package/fesm5/taiga-ui-addon-table-utils.js.map +0 -1
- package/fesm5/taiga-ui-addon-table.js +0 -9
- package/fesm5/taiga-ui-addon-table.js.map +0 -1
- package/interfaces/taiga-ui-addon-table-interfaces.metadata.json +0 -1
- package/taiga-ui-addon-table.metadata.json +0 -1
- package/tokens/taiga-ui-addon-table-tokens.metadata.json +0 -1
- package/types/taiga-ui-addon-table-types.metadata.json +0 -1
- package/utils/taiga-ui-addon-table-utils.metadata.json +0 -1
|
@@ -1,84 +1,95 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { TemplateRef, Directive, Inject, Input, ElementRef, Output, InjectionToken, SkipSelf, forwardRef, EventEmitter, ChangeDetectorRef, HostBinding, Component, ChangeDetectionStrategy, Optional, ContentChildren, Pipe, ContentChild, NgModule } from '@angular/core';
|
|
4
|
+
import * as i4 from '@taiga-ui/cdk';
|
|
5
|
+
import { tuiDefaultProp, tuiTypedFromEvent, tuiPreventDefault, AbstractTuiController, TuiTableSortKeyException, EMPTY_QUERY, tuiPure, TuiDestroyService, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
6
|
+
import * as i2 from '@angular/common';
|
|
4
7
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
|
-
import
|
|
8
|
+
import * as i1$1 from '@taiga-ui/core';
|
|
9
|
+
import { TUI_ELEMENT_REF, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_SIZE, MODE_PROVIDER, TUI_MODE, tuiWatchedControllerFactory, TuiSvgModule } from '@taiga-ui/core';
|
|
6
10
|
import { switchMap, distinctUntilChanged, map, takeUntil, filter, startWith } from 'rxjs/operators';
|
|
7
|
-
import {
|
|
11
|
+
import { tuiDefaultSort } from '@taiga-ui/addon-table/utils';
|
|
8
12
|
import { IntersectionObserverService, INTERSECTION_ROOT_MARGIN, INTERSECTION_THRESHOLD } from '@ng-web-apis/intersection-observer';
|
|
9
|
-
import { Observable } from 'rxjs';
|
|
10
13
|
import { TUI_INPUT_COUNT_OPTIONS } from '@taiga-ui/kit';
|
|
14
|
+
import * as i1 from 'rxjs';
|
|
15
|
+
import * as i3 from '@tinkoff/ng-polymorpheus';
|
|
11
16
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
12
17
|
import { NgControl } from '@angular/forms';
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
class TuiCellDirective {
|
|
15
20
|
constructor(template) {
|
|
16
21
|
this.template = template;
|
|
17
22
|
this.tuiCell = ``;
|
|
18
23
|
}
|
|
19
|
-
}
|
|
20
|
-
TuiCellDirective
|
|
21
|
-
|
|
22
|
-
];
|
|
24
|
+
}
|
|
25
|
+
TuiCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCellDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
|
+
TuiCellDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiCellDirective, selector: "[tuiCell]", inputs: { tuiCell: "tuiCell" }, ngImport: i0 });
|
|
23
27
|
__decorate([
|
|
24
|
-
Input(),
|
|
25
28
|
tuiDefaultProp()
|
|
26
29
|
], TuiCellDirective.prototype, "tuiCell", void 0);
|
|
27
|
-
TuiCellDirective
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
],
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCellDirective, decorators: [{
|
|
31
|
+
type: Directive,
|
|
32
|
+
args: [{
|
|
33
|
+
selector: `[tuiCell]`,
|
|
34
|
+
}]
|
|
35
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
36
|
+
type: Inject,
|
|
37
|
+
args: [TemplateRef]
|
|
38
|
+
}] }]; }, propDecorators: { tuiCell: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}] } });
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
class TuiHeadDirective {
|
|
35
43
|
constructor(template) {
|
|
36
44
|
this.template = template;
|
|
37
45
|
}
|
|
38
|
-
}
|
|
39
|
-
TuiHeadDirective
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
}
|
|
47
|
+
TuiHeadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiHeadDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
48
|
+
TuiHeadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiHeadDirective, selector: "[tuiHead]", inputs: { tuiHead: "tuiHead" }, ngImport: i0 });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiHeadDirective, decorators: [{
|
|
50
|
+
type: Directive,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: `[tuiHead]`,
|
|
53
|
+
}]
|
|
54
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
55
|
+
type: Inject,
|
|
56
|
+
args: [TemplateRef]
|
|
57
|
+
}] }]; }, propDecorators: { tuiHead: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}] } });
|
|
51
60
|
|
|
52
|
-
|
|
53
|
-
let TuiResizedDirective = class TuiResizedDirective {
|
|
61
|
+
class TuiResizedDirective {
|
|
54
62
|
constructor(documentRef, elementRef, parentRef) {
|
|
55
63
|
this.documentRef = documentRef;
|
|
56
64
|
this.elementRef = elementRef;
|
|
57
65
|
this.parentRef = parentRef;
|
|
58
|
-
this.tuiResized =
|
|
66
|
+
this.tuiResized = tuiTypedFromEvent(this.elementRef.nativeElement, `mousedown`).pipe(tuiPreventDefault(), switchMap(() => {
|
|
59
67
|
const { width, right } = this.parentRef.nativeElement.getBoundingClientRect();
|
|
60
|
-
return
|
|
68
|
+
return tuiTypedFromEvent(this.documentRef, `mousemove`).pipe(distinctUntilChanged(), map(({ clientX }) => width + clientX - right), takeUntil(tuiTypedFromEvent(this.documentRef, `mouseup`)));
|
|
61
69
|
}));
|
|
62
70
|
}
|
|
63
|
-
}
|
|
64
|
-
TuiResizedDirective
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
],
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
]
|
|
71
|
+
}
|
|
72
|
+
TuiResizedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiResizedDirective, deps: [{ token: DOCUMENT }, { token: ElementRef }, { token: TUI_ELEMENT_REF }], target: i0.ɵɵFactoryTarget.Directive });
|
|
73
|
+
TuiResizedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiResizedDirective, selector: "[tuiResized]", outputs: { tuiResized: "tuiResized" }, ngImport: i0 });
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiResizedDirective, decorators: [{
|
|
75
|
+
type: Directive,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: `[tuiResized]`,
|
|
78
|
+
}]
|
|
79
|
+
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
80
|
+
type: Inject,
|
|
81
|
+
args: [DOCUMENT]
|
|
82
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
83
|
+
type: Inject,
|
|
84
|
+
args: [ElementRef]
|
|
85
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
86
|
+
type: Inject,
|
|
87
|
+
args: [TUI_ELEMENT_REF]
|
|
88
|
+
}] }]; }, propDecorators: { tuiResized: [{
|
|
89
|
+
type: Output
|
|
90
|
+
}] } });
|
|
80
91
|
|
|
81
|
-
|
|
92
|
+
class TuiRowDirective {
|
|
82
93
|
constructor(template) {
|
|
83
94
|
this.template = template;
|
|
84
95
|
this.tuiRowOf = [];
|
|
@@ -86,43 +97,35 @@ let TuiRowDirective = class TuiRowDirective {
|
|
|
86
97
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
87
98
|
return true;
|
|
88
99
|
}
|
|
89
|
-
}
|
|
90
|
-
TuiRowDirective
|
|
91
|
-
|
|
92
|
-
];
|
|
100
|
+
}
|
|
101
|
+
TuiRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRowDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
102
|
+
TuiRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiRowDirective, selector: "ng-template[tuiRow]", inputs: { tuiRowOf: "tuiRowOf" }, ngImport: i0 });
|
|
93
103
|
__decorate([
|
|
94
|
-
Input(),
|
|
95
104
|
tuiDefaultProp()
|
|
96
105
|
], TuiRowDirective.prototype, "tuiRowOf", void 0);
|
|
97
|
-
TuiRowDirective
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
],
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRowDirective, decorators: [{
|
|
107
|
+
type: Directive,
|
|
108
|
+
args: [{
|
|
109
|
+
selector: `ng-template[tuiRow]`,
|
|
110
|
+
}]
|
|
111
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
112
|
+
type: Inject,
|
|
113
|
+
args: [TemplateRef]
|
|
114
|
+
}] }]; }, propDecorators: { tuiRowOf: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}] } });
|
|
103
117
|
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
105
|
-
function stuckFactory({ nativeElement }, entries$) {
|
|
106
|
-
const stream$ = entries$.pipe(map(([{ intersectionRatio }]) => intersectionRatio < 1));
|
|
107
|
-
nativeElement[`$.class._stuck`] = stream$;
|
|
108
|
-
return stream$;
|
|
109
|
-
}
|
|
110
118
|
const TUI_STUCK = new InjectionToken(`Stream of sticky stuck events`);
|
|
111
119
|
const TUI_STUCK_PROVIDER = {
|
|
112
120
|
provide: TUI_STUCK,
|
|
113
121
|
deps: [ElementRef, IntersectionObserverService],
|
|
114
|
-
useFactory:
|
|
122
|
+
useFactory: ({ nativeElement }, entries$) => {
|
|
123
|
+
const stream$ = entries$.pipe(map(([{ intersectionRatio }]) => intersectionRatio < 1));
|
|
124
|
+
nativeElement[`$.class._stuck`] = stream$;
|
|
125
|
+
return stream$;
|
|
126
|
+
},
|
|
115
127
|
};
|
|
116
128
|
|
|
117
|
-
// TODO: 3.0 remove in ivy compilation
|
|
118
|
-
const TABLE_THRESHOLD = [0, 1];
|
|
119
|
-
const TABLE_LABEL = {
|
|
120
|
-
labelOutside: true,
|
|
121
|
-
};
|
|
122
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
123
|
-
function inputCountOptionsFactory(options) {
|
|
124
|
-
return Object.assign(Object.assign({}, options), { hideButtons: true });
|
|
125
|
-
}
|
|
126
129
|
const TUI_TABLE_PROVIDERS = [
|
|
127
130
|
{
|
|
128
131
|
provide: INTERSECTION_ROOT_MARGIN,
|
|
@@ -130,21 +133,22 @@ const TUI_TABLE_PROVIDERS = [
|
|
|
130
133
|
},
|
|
131
134
|
{
|
|
132
135
|
provide: INTERSECTION_THRESHOLD,
|
|
133
|
-
useValue:
|
|
136
|
+
useValue: [0, 1],
|
|
134
137
|
},
|
|
135
138
|
{
|
|
136
139
|
provide: TUI_TEXTFIELD_APPEARANCE,
|
|
137
|
-
|
|
138
|
-
useValue: `table`,
|
|
140
|
+
useValue: "table" /* Table */,
|
|
139
141
|
},
|
|
140
142
|
{
|
|
141
143
|
provide: TUI_TEXTFIELD_LABEL_OUTSIDE,
|
|
142
|
-
useValue:
|
|
144
|
+
useValue: {
|
|
145
|
+
labelOutside: true,
|
|
146
|
+
},
|
|
143
147
|
},
|
|
144
148
|
{
|
|
145
149
|
provide: TUI_INPUT_COUNT_OPTIONS,
|
|
146
150
|
deps: [[new SkipSelf(), TUI_INPUT_COUNT_OPTIONS]],
|
|
147
|
-
useFactory:
|
|
151
|
+
useFactory: (options) => (Object.assign(Object.assign({}, options), { hideButtons: true })),
|
|
148
152
|
},
|
|
149
153
|
{
|
|
150
154
|
provide: TUI_TEXTFIELD_SIZE,
|
|
@@ -155,7 +159,7 @@ const TUI_TABLE_PROVIDERS = [
|
|
|
155
159
|
TUI_STUCK_PROVIDER,
|
|
156
160
|
];
|
|
157
161
|
|
|
158
|
-
|
|
162
|
+
class TuiTableDirective extends AbstractTuiController {
|
|
159
163
|
constructor(entries$, mode$, stuck$, changeDetectorRef) {
|
|
160
164
|
super();
|
|
161
165
|
this.entries$ = entries$;
|
|
@@ -185,58 +189,67 @@ let TuiTableDirective = class TuiTableDirective extends TuiController {
|
|
|
185
189
|
ngAfterViewInit() {
|
|
186
190
|
this.changeDetectorRef.detectChanges();
|
|
187
191
|
}
|
|
188
|
-
}
|
|
189
|
-
TuiTableDirective
|
|
190
|
-
|
|
191
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
|
|
192
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_STUCK,] }] },
|
|
193
|
-
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
|
|
194
|
-
];
|
|
192
|
+
}
|
|
193
|
+
TuiTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableDirective, deps: [{ token: IntersectionObserverService }, { token: TUI_MODE }, { token: TUI_STUCK }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
194
|
+
TuiTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTableDirective, selector: "table[tuiTable]", inputs: { columns: "columns", size: "size", direction: "direction", sorter: "sorter" }, outputs: { directionChange: "directionChange", sorterChange: "sorterChange" }, host: { listeners: { "$.data-mode.attr": "mode$", "$.class._stuck": "stuck$" }, properties: { "attr.data-size": "this.size" }, styleAttribute: "border-collapse: separate" }, providers: TUI_TABLE_PROVIDERS, usesInheritance: true, ngImport: i0 });
|
|
195
195
|
__decorate([
|
|
196
|
-
Input(),
|
|
197
196
|
tuiDefaultProp()
|
|
198
197
|
], TuiTableDirective.prototype, "columns", void 0);
|
|
199
198
|
__decorate([
|
|
200
|
-
Input(),
|
|
201
|
-
HostBinding(`attr.data-size`),
|
|
202
199
|
tuiDefaultProp()
|
|
203
200
|
], TuiTableDirective.prototype, "size", void 0);
|
|
204
201
|
__decorate([
|
|
205
|
-
Input(),
|
|
206
202
|
tuiDefaultProp()
|
|
207
203
|
], TuiTableDirective.prototype, "direction", void 0);
|
|
208
204
|
__decorate([
|
|
209
|
-
Output()
|
|
210
|
-
], TuiTableDirective.prototype, "directionChange", void 0);
|
|
211
|
-
__decorate([
|
|
212
|
-
Output()
|
|
213
|
-
], TuiTableDirective.prototype, "sorterChange", void 0);
|
|
214
|
-
__decorate([
|
|
215
|
-
Input(),
|
|
216
205
|
tuiDefaultProp()
|
|
217
206
|
], TuiTableDirective.prototype, "sorter", void 0);
|
|
218
|
-
TuiTableDirective
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
],
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableDirective, decorators: [{
|
|
208
|
+
type: Directive,
|
|
209
|
+
args: [{
|
|
210
|
+
selector: `table[tuiTable]`,
|
|
211
|
+
providers: TUI_TABLE_PROVIDERS,
|
|
212
|
+
host: {
|
|
213
|
+
'($.data-mode.attr)': `mode$`,
|
|
214
|
+
'($.class._stuck)': `stuck$`,
|
|
215
|
+
style: `border-collapse: separate`,
|
|
216
|
+
},
|
|
217
|
+
}]
|
|
218
|
+
}], ctorParameters: function () { return [{ type: i1.Observable, decorators: [{
|
|
219
|
+
type: Inject,
|
|
220
|
+
args: [IntersectionObserverService]
|
|
221
|
+
}] }, { type: i1.Observable, decorators: [{
|
|
222
|
+
type: Inject,
|
|
223
|
+
args: [TUI_MODE]
|
|
224
|
+
}] }, { type: i1.Observable, decorators: [{
|
|
225
|
+
type: Inject,
|
|
226
|
+
args: [TUI_STUCK]
|
|
227
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
228
|
+
type: Inject,
|
|
229
|
+
args: [ChangeDetectorRef]
|
|
230
|
+
}] }]; }, propDecorators: { columns: [{
|
|
231
|
+
type: Input
|
|
232
|
+
}], size: [{
|
|
233
|
+
type: Input
|
|
234
|
+
}, {
|
|
235
|
+
type: HostBinding,
|
|
236
|
+
args: [`attr.data-size`]
|
|
237
|
+
}], direction: [{
|
|
238
|
+
type: Input
|
|
239
|
+
}], directionChange: [{
|
|
240
|
+
type: Output
|
|
241
|
+
}], sorterChange: [{
|
|
242
|
+
type: Output
|
|
243
|
+
}], sorter: [{
|
|
244
|
+
type: Input
|
|
245
|
+
}] } });
|
|
233
246
|
|
|
234
|
-
|
|
247
|
+
class TuiThComponent {
|
|
235
248
|
constructor(head, table) {
|
|
236
249
|
this.head = head;
|
|
237
250
|
this.table = table;
|
|
238
251
|
this.sorter = this.head
|
|
239
|
-
? (a, b) =>
|
|
252
|
+
? (a, b) => tuiDefaultSort(a[this.key], b[this.key])
|
|
240
253
|
: null;
|
|
241
254
|
this.resizable = false;
|
|
242
255
|
this.sticky = false;
|
|
@@ -257,47 +270,62 @@ let TuiThComponent = class TuiThComponent {
|
|
|
257
270
|
onResized(width) {
|
|
258
271
|
this.width = width;
|
|
259
272
|
}
|
|
260
|
-
}
|
|
261
|
-
TuiThComponent
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
273
|
+
}
|
|
274
|
+
TuiThComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThComponent, deps: [{ token: TuiHeadDirective, optional: true }, { token: forwardRef(() => TuiTableDirective), optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
275
|
+
TuiThComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiThComponent, selector: "th[tuiTh]", inputs: { sorter: "sorter", resizable: "resizable", sticky: "sticky" }, host: { properties: { "class._sticky": "this.sticky", "style.width.px": "this.width" } }, providers: [
|
|
276
|
+
{
|
|
277
|
+
provide: TUI_ELEMENT_REF,
|
|
278
|
+
useExisting: ElementRef,
|
|
279
|
+
},
|
|
280
|
+
], ngImport: i0, 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", styles: [":host{transition-property:box-shadow;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);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:bold;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:.3s;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(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 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:.3s;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_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:.3s;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$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: TuiResizedDirective, selector: "[tuiResized]", outputs: ["tuiResized"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
265
281
|
__decorate([
|
|
266
|
-
Input(),
|
|
267
282
|
tuiDefaultProp()
|
|
268
283
|
], TuiThComponent.prototype, "sorter", void 0);
|
|
269
284
|
__decorate([
|
|
270
|
-
Input(),
|
|
271
285
|
tuiDefaultProp()
|
|
272
286
|
], TuiThComponent.prototype, "resizable", void 0);
|
|
273
287
|
__decorate([
|
|
274
|
-
Input(),
|
|
275
|
-
HostBinding(`class._sticky`),
|
|
276
288
|
tuiDefaultProp()
|
|
277
289
|
], TuiThComponent.prototype, "sticky", void 0);
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThComponent, decorators: [{
|
|
291
|
+
type: Component,
|
|
292
|
+
args: [{
|
|
293
|
+
selector: `th[tuiTh]`,
|
|
294
|
+
templateUrl: `./th.template.html`,
|
|
295
|
+
styleUrls: [`./th.style.less`],
|
|
296
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
297
|
+
providers: [
|
|
298
|
+
{
|
|
299
|
+
provide: TUI_ELEMENT_REF,
|
|
300
|
+
useExisting: ElementRef,
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
}]
|
|
304
|
+
}], ctorParameters: function () { return [{ type: TuiHeadDirective, decorators: [{
|
|
305
|
+
type: Optional
|
|
306
|
+
}, {
|
|
307
|
+
type: Inject,
|
|
308
|
+
args: [TuiHeadDirective]
|
|
309
|
+
}] }, { type: TuiTableDirective, decorators: [{
|
|
310
|
+
type: Optional
|
|
311
|
+
}, {
|
|
312
|
+
type: Inject,
|
|
313
|
+
args: [forwardRef(() => TuiTableDirective)]
|
|
314
|
+
}] }]; }, propDecorators: { sorter: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], resizable: [{
|
|
317
|
+
type: Input
|
|
318
|
+
}], sticky: [{
|
|
319
|
+
type: Input
|
|
320
|
+
}, {
|
|
321
|
+
type: HostBinding,
|
|
322
|
+
args: [`class._sticky`]
|
|
323
|
+
}], width: [{
|
|
324
|
+
type: HostBinding,
|
|
325
|
+
args: [`style.width.px`]
|
|
326
|
+
}] } });
|
|
299
327
|
|
|
300
|
-
|
|
328
|
+
class TuiSortableDirective {
|
|
301
329
|
constructor(sortBy, table, th) {
|
|
302
330
|
this.sortBy = sortBy;
|
|
303
331
|
this.table = table;
|
|
@@ -319,22 +347,26 @@ let TuiSortableDirective = class TuiSortableDirective {
|
|
|
319
347
|
get match() {
|
|
320
348
|
return this.sortBy.tuiSortBy === this.key;
|
|
321
349
|
}
|
|
322
|
-
}
|
|
323
|
-
TuiSortableDirective
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
]
|
|
350
|
+
}
|
|
351
|
+
TuiSortableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortableDirective, deps: [{ token: forwardRef(() => TuiSortByDirective) }, { token: TuiTableDirective }, { token: TuiThComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
352
|
+
TuiSortableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSortableDirective, selector: "th[tuiTh][tuiSortable]", ngImport: i0 });
|
|
353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortableDirective, decorators: [{
|
|
354
|
+
type: Directive,
|
|
355
|
+
args: [{
|
|
356
|
+
selector: `th[tuiTh][tuiSortable]`,
|
|
357
|
+
}]
|
|
358
|
+
}], ctorParameters: function () { return [{ type: TuiSortByDirective, decorators: [{
|
|
359
|
+
type: Inject,
|
|
360
|
+
args: [forwardRef(() => TuiSortByDirective)]
|
|
361
|
+
}] }, { type: TuiTableDirective, decorators: [{
|
|
362
|
+
type: Inject,
|
|
363
|
+
args: [TuiTableDirective]
|
|
364
|
+
}] }, { type: TuiThComponent, decorators: [{
|
|
365
|
+
type: Inject,
|
|
366
|
+
args: [TuiThComponent]
|
|
367
|
+
}] }]; } });
|
|
336
368
|
|
|
337
|
-
|
|
369
|
+
class TuiSortByDirective {
|
|
338
370
|
constructor(table) {
|
|
339
371
|
this.table = table;
|
|
340
372
|
this.sortables = EMPTY_QUERY;
|
|
@@ -342,57 +374,68 @@ let TuiSortByDirective = class TuiSortByDirective {
|
|
|
342
374
|
this.tuiSortByChange = this.table.sorterChange.pipe(filter(() => !!this.sortables.length), map(sorter => this.getKey(sorter)));
|
|
343
375
|
}
|
|
344
376
|
getKey(sorter) {
|
|
345
|
-
var _a
|
|
346
|
-
return (
|
|
377
|
+
var _a;
|
|
378
|
+
return ((_a = this.sortables.find(s => s.sorter === sorter)) === null || _a === void 0 ? void 0 : _a.key) || null;
|
|
347
379
|
}
|
|
348
|
-
}
|
|
349
|
-
TuiSortByDirective
|
|
350
|
-
|
|
351
|
-
];
|
|
352
|
-
__decorate([
|
|
353
|
-
ContentChildren(TuiSortableDirective, { descendants: true })
|
|
354
|
-
], TuiSortByDirective.prototype, "sortables", void 0);
|
|
380
|
+
}
|
|
381
|
+
TuiSortByDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortByDirective, deps: [{ token: TuiTableDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
382
|
+
TuiSortByDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSortByDirective, selector: "table[tuiTable][tuiSortBy]", inputs: { tuiSortBy: "tuiSortBy" }, outputs: { tuiSortByChange: "tuiSortByChange" }, queries: [{ propertyName: "sortables", predicate: TuiSortableDirective, descendants: true }], ngImport: i0 });
|
|
355
383
|
__decorate([
|
|
356
|
-
Input(),
|
|
357
384
|
tuiDefaultProp()
|
|
358
385
|
], TuiSortByDirective.prototype, "tuiSortBy", void 0);
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
],
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortByDirective, decorators: [{
|
|
387
|
+
type: Directive,
|
|
388
|
+
args: [{
|
|
389
|
+
selector: `table[tuiTable][tuiSortBy]`,
|
|
390
|
+
}]
|
|
391
|
+
}], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
|
|
392
|
+
type: Inject,
|
|
393
|
+
args: [TuiTableDirective]
|
|
394
|
+
}] }]; }, propDecorators: { sortables: [{
|
|
395
|
+
type: ContentChildren,
|
|
396
|
+
args: [TuiSortableDirective, { descendants: true }]
|
|
397
|
+
}], tuiSortBy: [{
|
|
398
|
+
type: Input
|
|
399
|
+
}], tuiSortByChange: [{
|
|
400
|
+
type: Output
|
|
401
|
+
}] } });
|
|
368
402
|
|
|
369
|
-
|
|
403
|
+
class TuiTheadDirective {
|
|
370
404
|
constructor(stuck$) {
|
|
371
405
|
this.stuck$ = stuck$;
|
|
372
406
|
}
|
|
373
|
-
}
|
|
374
|
-
TuiTheadDirective
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
TUI_STUCK_PROVIDER,
|
|
382
|
-
IntersectionObserverService,
|
|
383
|
-
{
|
|
384
|
-
provide: INTERSECTION_ROOT_MARGIN,
|
|
385
|
-
useValue: `0px 10000px 10000px 10000px`,
|
|
386
|
-
},
|
|
387
|
-
],
|
|
388
|
-
host: {
|
|
389
|
-
'($.class._stuck)': `stuck$`,
|
|
407
|
+
}
|
|
408
|
+
TuiTheadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTheadDirective, deps: [{ token: TUI_STUCK }], target: i0.ɵɵFactoryTarget.Directive });
|
|
409
|
+
TuiTheadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTheadDirective, selector: "thead[tuiThead]", host: { listeners: { "$.class._stuck": "stuck$" } }, providers: [
|
|
410
|
+
TUI_STUCK_PROVIDER,
|
|
411
|
+
IntersectionObserverService,
|
|
412
|
+
{
|
|
413
|
+
provide: INTERSECTION_ROOT_MARGIN,
|
|
414
|
+
useValue: `0px 10000px 10000px 10000px`,
|
|
390
415
|
},
|
|
391
|
-
})
|
|
392
|
-
|
|
393
|
-
|
|
416
|
+
], ngImport: i0 });
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTheadDirective, decorators: [{
|
|
418
|
+
type: Directive,
|
|
419
|
+
args: [{
|
|
420
|
+
selector: `thead[tuiThead]`,
|
|
421
|
+
providers: [
|
|
422
|
+
TUI_STUCK_PROVIDER,
|
|
423
|
+
IntersectionObserverService,
|
|
424
|
+
{
|
|
425
|
+
provide: INTERSECTION_ROOT_MARGIN,
|
|
426
|
+
useValue: `0px 10000px 10000px 10000px`,
|
|
427
|
+
},
|
|
428
|
+
],
|
|
429
|
+
host: {
|
|
430
|
+
'($.class._stuck)': `stuck$`,
|
|
431
|
+
},
|
|
432
|
+
}]
|
|
433
|
+
}], ctorParameters: function () { return [{ type: i1.Observable, decorators: [{
|
|
434
|
+
type: Inject,
|
|
435
|
+
args: [TUI_STUCK]
|
|
436
|
+
}] }]; } });
|
|
394
437
|
|
|
395
|
-
|
|
438
|
+
class TuiTableSortPipe {
|
|
396
439
|
constructor(table) {
|
|
397
440
|
this.table = table;
|
|
398
441
|
}
|
|
@@ -402,34 +445,58 @@ let TuiTableSortPipe = class TuiTableSortPipe {
|
|
|
402
445
|
sort(data, sorter, direction) {
|
|
403
446
|
return [...data].sort((a, b) => direction * sorter(a, b));
|
|
404
447
|
}
|
|
405
|
-
}
|
|
406
|
-
TuiTableSortPipe
|
|
407
|
-
|
|
408
|
-
];
|
|
448
|
+
}
|
|
449
|
+
TuiTableSortPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableSortPipe, deps: [{ token: TuiTableDirective }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
450
|
+
TuiTableSortPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableSortPipe, name: "tuiTableSort", pure: false });
|
|
409
451
|
__decorate([
|
|
410
452
|
tuiPure
|
|
411
453
|
], TuiTableSortPipe.prototype, "sort", null);
|
|
412
|
-
TuiTableSortPipe
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
],
|
|
454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableSortPipe, decorators: [{
|
|
455
|
+
type: Pipe,
|
|
456
|
+
args: [{
|
|
457
|
+
name: `tuiTableSort`,
|
|
458
|
+
pure: false,
|
|
459
|
+
}]
|
|
460
|
+
}], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
|
|
461
|
+
type: Inject,
|
|
462
|
+
args: [TuiTableDirective]
|
|
463
|
+
}] }]; }, propDecorators: { sort: [] } });
|
|
419
464
|
|
|
420
|
-
// TODO: 3.0 remove in ivy compilation
|
|
421
|
-
const TABLE_FACTORY = watchedControllerFactory;
|
|
422
465
|
const TUI_TABLE_PROVIDER = [
|
|
423
466
|
TuiDestroyService,
|
|
424
467
|
TuiTableSortPipe,
|
|
425
468
|
{
|
|
426
469
|
provide: TuiTableDirective,
|
|
427
470
|
deps: [[new SkipSelf(), TuiTableDirective], ChangeDetectorRef, TuiDestroyService],
|
|
428
|
-
useFactory:
|
|
471
|
+
useFactory: tuiWatchedControllerFactory,
|
|
429
472
|
},
|
|
430
473
|
];
|
|
431
474
|
|
|
432
|
-
|
|
475
|
+
class TuiTdComponent {
|
|
476
|
+
}
|
|
477
|
+
TuiTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTdComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
478
|
+
TuiTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTdComponent, selector: "th[tuiTd], td[tuiTd]", host: { properties: { "class._editable": "this.control" } }, queries: [{ propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: `
|
|
479
|
+
<ng-content></ng-content>
|
|
480
|
+
`, 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;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:.3s;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.ChangeDetectionStrategy.OnPush });
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTdComponent, decorators: [{
|
|
482
|
+
type: Component,
|
|
483
|
+
args: [{
|
|
484
|
+
selector: `th[tuiTd], td[tuiTd]`,
|
|
485
|
+
template: `
|
|
486
|
+
<ng-content></ng-content>
|
|
487
|
+
`,
|
|
488
|
+
styleUrls: [`./td.style.less`],
|
|
489
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
490
|
+
}]
|
|
491
|
+
}], propDecorators: { control: [{
|
|
492
|
+
type: HostBinding,
|
|
493
|
+
args: [`class._editable`]
|
|
494
|
+
}, {
|
|
495
|
+
type: ContentChild,
|
|
496
|
+
args: [NgControl]
|
|
497
|
+
}] } });
|
|
498
|
+
|
|
499
|
+
class TuiTrComponent {
|
|
433
500
|
constructor(table, body) {
|
|
434
501
|
this.table = table;
|
|
435
502
|
this.body = body;
|
|
@@ -437,26 +504,29 @@ let TuiTrComponent = class TuiTrComponent {
|
|
|
437
504
|
this.cells$ = this.cells.changes.pipe(startWith(null), map(() => this.cells.reduce((record, item) => (Object.assign(Object.assign({}, record), { [item.tuiCell]: item })), {})));
|
|
438
505
|
this.item$ = this.body.rows.changes.pipe(startWith(null), map(() => this.body.sorted[this.body.rows.toArray().findIndex(row => row === this)]));
|
|
439
506
|
}
|
|
440
|
-
}
|
|
441
|
-
TuiTrComponent
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
],
|
|
507
|
+
}
|
|
508
|
+
TuiTrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTrComponent, deps: [{ token: forwardRef(() => TuiTableDirective) }, { token: forwardRef(() => TuiTbodyComponent) }], target: i0.ɵɵFactoryTarget.Component });
|
|
509
|
+
TuiTrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTrComponent, selector: "tr[tuiTr]", providers: [TUI_TABLE_PROVIDER], queries: [{ propertyName: "cells", predicate: i0.forwardRef(function () { return TuiCellDirective; }) }], ngImport: i0, 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", components: [{ type: TuiTdComponent, selector: "th[tuiTd], td[tuiTd]" }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTrComponent, decorators: [{
|
|
511
|
+
type: Component,
|
|
512
|
+
args: [{
|
|
513
|
+
selector: `tr[tuiTr]`,
|
|
514
|
+
templateUrl: `./tr.template.html`,
|
|
515
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
516
|
+
providers: [TUI_TABLE_PROVIDER],
|
|
517
|
+
}]
|
|
518
|
+
}], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
|
|
519
|
+
type: Inject,
|
|
520
|
+
args: [forwardRef(() => TuiTableDirective)]
|
|
521
|
+
}] }, { type: TuiTbodyComponent, decorators: [{
|
|
522
|
+
type: Inject,
|
|
523
|
+
args: [forwardRef(() => TuiTbodyComponent)]
|
|
524
|
+
}] }]; }, propDecorators: { cells: [{
|
|
525
|
+
type: ContentChildren,
|
|
526
|
+
args: [forwardRef(() => TuiCellDirective)]
|
|
527
|
+
}] } });
|
|
458
528
|
|
|
459
|
-
|
|
529
|
+
class TuiTbodyComponent {
|
|
460
530
|
constructor(pipe, table) {
|
|
461
531
|
this.pipe = pipe;
|
|
462
532
|
this.table = table;
|
|
@@ -474,129 +544,148 @@ let TuiTbodyComponent = class TuiTbodyComponent {
|
|
|
474
544
|
this.open = !this.open;
|
|
475
545
|
this.openChange.emit(this.open);
|
|
476
546
|
}
|
|
477
|
-
}
|
|
478
|
-
TuiTbodyComponent
|
|
479
|
-
{ type:
|
|
480
|
-
{ type: TuiTableDirective, decorators: [{ type: Inject, args: [forwardRef(() => TuiTableDirective),] }] }
|
|
481
|
-
];
|
|
547
|
+
}
|
|
548
|
+
TuiTbodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTbodyComponent, deps: [{ token: TuiTableSortPipe }, { token: forwardRef(() => TuiTableDirective) }], target: i0.ɵɵFactoryTarget.Component });
|
|
549
|
+
TuiTbodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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.forwardRef(function () { return TuiRowDirective; }), descendants: true }, { propertyName: "rows", predicate: i0.forwardRef(function () { return TuiTrComponent; }) }], ngImport: i0, template: "<ng-content></ng-content>\n<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 src=\"tuiIconChevronDownLarge\"\n class=\"t-chevron\"\n [class.t-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", 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{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\"]) .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:.3s;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$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiMapper": i4.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
482
550
|
__decorate([
|
|
483
|
-
Input(),
|
|
484
551
|
tuiDefaultProp()
|
|
485
552
|
], TuiTbodyComponent.prototype, "data", void 0);
|
|
486
553
|
__decorate([
|
|
487
|
-
Input(),
|
|
488
554
|
tuiDefaultProp()
|
|
489
555
|
], TuiTbodyComponent.prototype, "heading", void 0);
|
|
490
556
|
__decorate([
|
|
491
|
-
Input(),
|
|
492
557
|
tuiDefaultProp()
|
|
493
558
|
], TuiTbodyComponent.prototype, "open", void 0);
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
]
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
],
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTbodyComponent, decorators: [{
|
|
560
|
+
type: Component,
|
|
561
|
+
args: [{
|
|
562
|
+
selector: `tbody[tuiTbody]`,
|
|
563
|
+
templateUrl: `./tbody.template.html`,
|
|
564
|
+
styleUrls: [`./tbody.style.less`],
|
|
565
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
566
|
+
providers: TUI_TABLE_PROVIDER,
|
|
567
|
+
}]
|
|
568
|
+
}], ctorParameters: function () { return [{ type: TuiTableSortPipe, decorators: [{
|
|
569
|
+
type: Inject,
|
|
570
|
+
args: [TuiTableSortPipe]
|
|
571
|
+
}] }, { type: TuiTableDirective, decorators: [{
|
|
572
|
+
type: Inject,
|
|
573
|
+
args: [forwardRef(() => TuiTableDirective)]
|
|
574
|
+
}] }]; }, propDecorators: { data: [{
|
|
575
|
+
type: Input
|
|
576
|
+
}], heading: [{
|
|
577
|
+
type: Input
|
|
578
|
+
}], open: [{
|
|
579
|
+
type: Input
|
|
580
|
+
}], openChange: [{
|
|
581
|
+
type: Output
|
|
582
|
+
}], row: [{
|
|
583
|
+
type: ContentChild,
|
|
584
|
+
args: [forwardRef(() => TuiRowDirective)]
|
|
585
|
+
}], rows: [{
|
|
586
|
+
type: ContentChildren,
|
|
587
|
+
args: [forwardRef(() => TuiTrComponent)]
|
|
588
|
+
}] } });
|
|
514
589
|
|
|
515
|
-
|
|
516
|
-
};
|
|
517
|
-
__decorate([
|
|
518
|
-
HostBinding(`class._editable`),
|
|
519
|
-
ContentChild(NgControl)
|
|
520
|
-
], TuiTdComponent.prototype, "control", void 0);
|
|
521
|
-
TuiTdComponent = __decorate([
|
|
522
|
-
Component({
|
|
523
|
-
selector: `th[tuiTd], td[tuiTd]`,
|
|
524
|
-
template: `
|
|
525
|
-
<ng-content></ng-content>
|
|
526
|
-
`,
|
|
527
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
528
|
-
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}"]
|
|
529
|
-
})
|
|
530
|
-
], TuiTdComponent);
|
|
531
|
-
|
|
532
|
-
let TuiThGroupComponent = class TuiThGroupComponent {
|
|
590
|
+
class TuiThGroupComponent {
|
|
533
591
|
constructor(table) {
|
|
534
592
|
this.table = table;
|
|
535
593
|
this.heads = EMPTY_QUERY;
|
|
536
594
|
this.heads$ = this.heads.changes.pipe(startWith(null), map(() => this.heads.reduce((record, item) => (Object.assign(Object.assign({}, record), { [item.tuiHead]: item })), {})));
|
|
537
595
|
}
|
|
538
|
-
}
|
|
539
|
-
TuiThGroupComponent
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
]
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
],
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
596
|
+
}
|
|
597
|
+
TuiThGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThGroupComponent, deps: [{ token: forwardRef(() => TuiTableDirective) }], target: i0.ɵɵFactoryTarget.Component });
|
|
598
|
+
TuiThGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiThGroupComponent, selector: "tr[tuiThGroup]", providers: [TUI_TABLE_PROVIDER], queries: [{ propertyName: "th", first: true, predicate: i0.forwardRef(function () { return TuiThComponent; }), descendants: true }, { propertyName: "heads", predicate: i0.forwardRef(function () { return TuiHeadDirective; }) }], ngImport: i0, 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", components: [{ type: TuiThComponent, selector: "th[tuiTh]", inputs: ["sorter", "resizable", "sticky"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThGroupComponent, decorators: [{
|
|
600
|
+
type: Component,
|
|
601
|
+
args: [{
|
|
602
|
+
selector: `tr[tuiThGroup]`,
|
|
603
|
+
templateUrl: `./th-group.template.html`,
|
|
604
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
605
|
+
providers: [TUI_TABLE_PROVIDER],
|
|
606
|
+
}]
|
|
607
|
+
}], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
|
|
608
|
+
type: Inject,
|
|
609
|
+
args: [forwardRef(() => TuiTableDirective)]
|
|
610
|
+
}] }]; }, propDecorators: { th: [{
|
|
611
|
+
type: ContentChild,
|
|
612
|
+
args: [forwardRef(() => TuiThComponent)]
|
|
613
|
+
}], heads: [{
|
|
614
|
+
type: ContentChildren,
|
|
615
|
+
args: [forwardRef(() => TuiHeadDirective)]
|
|
616
|
+
}] } });
|
|
557
617
|
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
TuiTableModule =
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
618
|
+
class TuiTableModule {
|
|
619
|
+
}
|
|
620
|
+
TuiTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
621
|
+
TuiTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, declarations: [TuiTableDirective,
|
|
622
|
+
TuiTbodyComponent,
|
|
623
|
+
TuiThGroupComponent,
|
|
624
|
+
TuiThComponent,
|
|
625
|
+
TuiTdComponent,
|
|
626
|
+
TuiTrComponent,
|
|
627
|
+
TuiCellDirective,
|
|
628
|
+
TuiHeadDirective,
|
|
629
|
+
TuiRowDirective,
|
|
630
|
+
TuiSortByDirective,
|
|
631
|
+
TuiSortableDirective,
|
|
632
|
+
TuiTheadDirective,
|
|
633
|
+
TuiResizedDirective,
|
|
634
|
+
TuiTableSortPipe], imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule], exports: [TuiTableDirective,
|
|
635
|
+
TuiTbodyComponent,
|
|
636
|
+
TuiThGroupComponent,
|
|
637
|
+
TuiThComponent,
|
|
638
|
+
TuiTdComponent,
|
|
639
|
+
TuiTrComponent,
|
|
640
|
+
TuiCellDirective,
|
|
641
|
+
TuiHeadDirective,
|
|
642
|
+
TuiRowDirective,
|
|
643
|
+
TuiSortByDirective,
|
|
644
|
+
TuiSortableDirective,
|
|
645
|
+
TuiTheadDirective,
|
|
646
|
+
TuiTableSortPipe] });
|
|
647
|
+
TuiTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, imports: [[CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule]] });
|
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, decorators: [{
|
|
649
|
+
type: NgModule,
|
|
650
|
+
args: [{
|
|
651
|
+
imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule],
|
|
652
|
+
declarations: [
|
|
653
|
+
TuiTableDirective,
|
|
654
|
+
TuiTbodyComponent,
|
|
655
|
+
TuiThGroupComponent,
|
|
656
|
+
TuiThComponent,
|
|
657
|
+
TuiTdComponent,
|
|
658
|
+
TuiTrComponent,
|
|
659
|
+
TuiCellDirective,
|
|
660
|
+
TuiHeadDirective,
|
|
661
|
+
TuiRowDirective,
|
|
662
|
+
TuiSortByDirective,
|
|
663
|
+
TuiSortableDirective,
|
|
664
|
+
TuiTheadDirective,
|
|
665
|
+
TuiResizedDirective,
|
|
666
|
+
TuiTableSortPipe,
|
|
667
|
+
],
|
|
668
|
+
exports: [
|
|
669
|
+
TuiTableDirective,
|
|
670
|
+
TuiTbodyComponent,
|
|
671
|
+
TuiThGroupComponent,
|
|
672
|
+
TuiThComponent,
|
|
673
|
+
TuiTdComponent,
|
|
674
|
+
TuiTrComponent,
|
|
675
|
+
TuiCellDirective,
|
|
676
|
+
TuiHeadDirective,
|
|
677
|
+
TuiRowDirective,
|
|
678
|
+
TuiSortByDirective,
|
|
679
|
+
TuiSortableDirective,
|
|
680
|
+
TuiTheadDirective,
|
|
681
|
+
TuiTableSortPipe,
|
|
682
|
+
],
|
|
683
|
+
}]
|
|
684
|
+
}] });
|
|
596
685
|
|
|
597
686
|
/**
|
|
598
687
|
* Generated bundle index. Do not edit.
|
|
599
688
|
*/
|
|
600
689
|
|
|
601
|
-
export {
|
|
690
|
+
export { TUI_STUCK, TUI_STUCK_PROVIDER, TUI_TABLE_PROVIDER, TUI_TABLE_PROVIDERS, TuiCellDirective, TuiHeadDirective, TuiResizedDirective, TuiRowDirective, TuiSortByDirective, TuiSortableDirective, TuiTableDirective, TuiTableModule, TuiTableSortPipe, TuiTbodyComponent, TuiTdComponent, TuiThComponent, TuiThGroupComponent, TuiTheadDirective, TuiTrComponent };
|
|
602
691
|
//# sourceMappingURL=taiga-ui-addon-table-components-table.js.map
|