@ng-nest/ui 20.0.7 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auto-complete/index.d.ts +33 -8
- package/base-form/index.d.ts +3 -3
- package/calendar/index.d.ts +1 -2
- package/cascade/index.d.ts +33 -8
- package/checkbox/index.d.ts +3 -3
- package/color-picker/index.d.ts +34 -8
- package/core/index.d.ts +40 -8
- package/date-picker/index.d.ts +57 -12
- package/dropdown/index.d.ts +4 -4
- package/fesm2022/ng-nest-ui-affix.mjs +12 -12
- package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-alert.mjs +35 -35
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +31 -31
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +7 -7
- package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +82 -72
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +31 -31
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +18 -18
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +23 -23
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +45 -45
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +42 -42
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +20 -20
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +15 -15
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +46 -46
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +86 -76
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +39 -39
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +31 -31
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +91 -72
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +16 -16
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +21 -21
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +37 -37
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +38 -22
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +13 -13
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +273 -253
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +31 -31
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +81 -81
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drawer.mjs +42 -42
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +49 -49
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +12 -12
- package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-examples.mjs +7 -7
- package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-find.mjs +79 -77
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +33 -33
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +20 -20
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +15 -15
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +21 -21
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +39 -39
- package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-inner.mjs +11 -11
- package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +42 -42
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +102 -81
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +15 -15
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +31 -31
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +18 -18
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +80 -80
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +22 -22
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +45 -45
- package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
- package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message.mjs +10 -10
- package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-outlet.mjs +9 -9
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +15 -15
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +53 -53
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popconfirm.mjs +27 -27
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +38 -38
- package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-portal.mjs +7 -7
- package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-progress.mjs +38 -38
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +36 -36
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +30 -30
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +16 -16
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +16 -16
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +13 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +102 -19
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +121 -111
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +15 -15
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +54 -54
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +39 -39
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +30 -30
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +19 -19
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +26 -26
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +490 -242
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +221 -221
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +58 -58
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +22 -22
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +15 -15
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +41 -41
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +23 -23
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-picker.mjs +104 -94
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-timeline.mjs +15 -15
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +38 -38
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +40 -40
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +28 -28
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +126 -116
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +107 -107
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +13 -13
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +37 -37
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/find/index.d.ts +5 -5
- package/form/index.d.ts +1 -1
- package/input/index.d.ts +32 -5
- package/input-number/index.d.ts +5 -5
- package/list/index.d.ts +2 -2
- package/message-box/index.d.ts +4 -5
- package/package.json +20 -20
- package/radio/index.d.ts +3 -3
- package/rate/index.d.ts +5 -5
- package/scrollable/index.d.ts +15 -7
- package/select/index.d.ts +38 -8
- package/slider-select/index.d.ts +3 -3
- package/steps/index.d.ts +1 -2
- package/switch/index.d.ts +3 -3
- package/table-view/index.d.ts +121 -79
- package/textarea/index.d.ts +3 -3
- package/theme/index.d.ts +1 -1
- package/time-picker/index.d.ts +33 -8
- package/transfer/index.d.ts +1 -1
- package/tree-select/index.d.ts +33 -8
- package/upload/index.d.ts +2 -2
|
@@ -1,149 +1,337 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Injectable, inject, Component, booleanAttribute, Directive, signal, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, viewChild, contentChild, contentChildren, Input, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { CdkTable, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CdkCellOutlet, CdkFooterRow, CdkRow, CdkNoDataRow, HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet, CDK_TABLE, STICKY_POSITIONING_LISTENER, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkTextColumn, CdkTableModule } from '@angular/cdk/table';
|
|
4
|
+
import { _DisposeViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY } from '@angular/cdk/collections';
|
|
5
|
+
import { XConfigService } from '@ng-nest/ui/core';
|
|
5
6
|
|
|
6
7
|
class XTableViewService {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.selectedCells = [];
|
|
9
10
|
this.activedRows = [];
|
|
10
11
|
this.selectedHeaderCell = null;
|
|
11
|
-
this.
|
|
12
|
+
this.activedHeaderCells = [];
|
|
13
|
+
this.stickyHeaderRows = [];
|
|
12
14
|
}
|
|
13
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
14
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
15
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewService }); }
|
|
15
17
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewService, decorators: [{
|
|
17
19
|
type: Injectable
|
|
18
20
|
}] });
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Table view
|
|
24
|
+
* @selector x-table-view
|
|
25
|
+
* @decorator component
|
|
26
|
+
*/
|
|
27
|
+
const XTableViewPrefix = 'x-table-view';
|
|
28
|
+
const X_TABLE_VIEW_CONFIG_NAME = 'tableView';
|
|
29
|
+
/**
|
|
30
|
+
* Table view Property
|
|
31
|
+
*/
|
|
32
|
+
class XTableViewProperty extends CdkTable {
|
|
21
33
|
constructor() {
|
|
22
|
-
|
|
23
|
-
this.
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.config = inject(XConfigService).getConfigForComponent(X_TABLE_VIEW_CONFIG_NAME);
|
|
24
36
|
}
|
|
25
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
26
|
-
/** @nocollapse */ static { this.ɵ
|
|
37
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: XTableViewProperty, isStandalone: true, selector: "x-table-view-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewProperty, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: `${XTableViewPrefix}-property`, template: '' }]
|
|
43
|
+
}] });
|
|
44
|
+
|
|
45
|
+
const ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;
|
|
46
|
+
class XTableHeaderRowDef extends CdkHeaderRowDef {
|
|
47
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.4", type: XTableHeaderRowDef, isStandalone: true, selector: "[xTableHeaderRowDef]", inputs: { columns: ["xTableHeaderRowDef", "columns"], sticky: ["xTableHeaderRowDefSticky", "sticky", booleanAttribute] }, providers: [{ provide: CdkHeaderRowDef, useExisting: XTableHeaderRowDef }], usesInheritance: true, ngImport: i0 }); }
|
|
27
49
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderRowDef, decorators: [{
|
|
29
51
|
type: Directive,
|
|
30
52
|
args: [{
|
|
31
|
-
selector: '[
|
|
53
|
+
selector: '[xTableHeaderRowDef]',
|
|
54
|
+
providers: [{ provide: CdkHeaderRowDef, useExisting: XTableHeaderRowDef }],
|
|
55
|
+
inputs: [
|
|
56
|
+
{ name: 'columns', alias: 'xTableHeaderRowDef' },
|
|
57
|
+
{ name: 'sticky', alias: 'xTableHeaderRowDefSticky', transform: booleanAttribute }
|
|
58
|
+
]
|
|
32
59
|
}]
|
|
33
|
-
}]
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
}] });
|
|
61
|
+
class XTableFooterRowDef extends CdkFooterRowDef {
|
|
62
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.4", type: XTableFooterRowDef, isStandalone: true, selector: "[xTableFooterRowDef]", inputs: { columns: ["xTableFooterRowDef", "columns"], sticky: ["xTableFooterRowDefSticky", "sticky", booleanAttribute] }, providers: [{ provide: CdkFooterRowDef, useExisting: XTableFooterRowDef }], usesInheritance: true, ngImport: i0 }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterRowDef, decorators: [{
|
|
66
|
+
type: Directive,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: '[xTableFooterRowDef]',
|
|
69
|
+
providers: [{ provide: CdkFooterRowDef, useExisting: XTableFooterRowDef }],
|
|
70
|
+
inputs: [
|
|
71
|
+
{ name: 'columns', alias: 'xTableFooterRowDef' },
|
|
72
|
+
{ name: 'sticky', alias: 'xTableFooterRowDefSticky', transform: booleanAttribute }
|
|
73
|
+
]
|
|
74
|
+
}]
|
|
75
|
+
}] });
|
|
76
|
+
class XTableViewRowDef extends CdkRowDef {
|
|
77
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
78
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableViewRowDef, isStandalone: true, selector: "[xTableRowDef]", inputs: { columns: ["xTableRowDefColumns", "columns"], when: ["xTableRowDefWhen", "when"] }, providers: [{ provide: CdkRowDef, useExisting: XTableViewRowDef }], usesInheritance: true, ngImport: i0 }); }
|
|
79
|
+
}
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewRowDef, decorators: [{
|
|
81
|
+
type: Directive,
|
|
82
|
+
args: [{
|
|
83
|
+
selector: '[xTableRowDef]',
|
|
84
|
+
providers: [{ provide: CdkRowDef, useExisting: XTableViewRowDef }],
|
|
85
|
+
inputs: [
|
|
86
|
+
{ name: 'columns', alias: 'xTableRowDefColumns' },
|
|
87
|
+
{ name: 'when', alias: 'xTableRowDefWhen' }
|
|
88
|
+
]
|
|
89
|
+
}]
|
|
90
|
+
}] });
|
|
91
|
+
class XTableHeaderRow extends CdkHeaderRow {
|
|
37
92
|
constructor() {
|
|
38
|
-
|
|
39
|
-
this.
|
|
93
|
+
super(...arguments);
|
|
94
|
+
this.tableView = inject(XTableView, { optional: true });
|
|
95
|
+
this.tableViewService = inject(XTableViewService, { optional: true });
|
|
96
|
+
this.sticking = signal(false, ...(ngDevMode ? [{ debugName: "sticking" }] : []));
|
|
97
|
+
}
|
|
98
|
+
get isSticking() {
|
|
99
|
+
return this.sticking();
|
|
100
|
+
}
|
|
101
|
+
ngAfterViewInit() {
|
|
102
|
+
this.listenerSticky();
|
|
103
|
+
}
|
|
104
|
+
listenerSticky() {
|
|
105
|
+
const index = this.tableView?.headerRows().findIndex((x) => x === this);
|
|
106
|
+
if (index === undefined || index < 0)
|
|
107
|
+
return;
|
|
108
|
+
const rowLen = this.tableView?.headerRowRefs()?.length ?? 0;
|
|
109
|
+
if (rowLen === 0 || rowLen < index)
|
|
110
|
+
return;
|
|
111
|
+
const sticky = this.tableView?.headerRowRefs()[index].sticky;
|
|
112
|
+
if (!sticky)
|
|
113
|
+
return;
|
|
114
|
+
const sentinel = this.tableView?.sentinelTop().nativeElement;
|
|
115
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
116
|
+
const sticking = !entry.isIntersecting;
|
|
117
|
+
if (sticking) {
|
|
118
|
+
if (!this.tableViewService.stickyHeaderRows.includes(this)) {
|
|
119
|
+
this.tableViewService.stickyHeaderRows.push(this);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (this.tableViewService.stickyHeaderRows.includes(this)) {
|
|
124
|
+
this.tableViewService.stickyHeaderRows = this.tableViewService.stickyHeaderRows.filter((item) => item !== this);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
this.sticking.set(sticking);
|
|
128
|
+
}, { threshold: 0 });
|
|
129
|
+
observer.observe(sentinel);
|
|
40
130
|
}
|
|
41
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
42
|
-
/** @nocollapse */ static { this.ɵ
|
|
131
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: XTableHeaderRow, isStandalone: true, selector: "x-table-header-row, tr[x-table-header-row]", host: { attributes: { "role": "row" }, properties: { "class.x-table-sticky-top": "this.isSticking" }, classAttribute: "x-table-header-row" }, providers: [{ provide: CdkHeaderRow, useExisting: XTableHeaderRow }], exportAs: ["xTableHeaderRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
43
133
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
45
|
-
type:
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderRow, decorators: [{
|
|
135
|
+
type: Component,
|
|
46
136
|
args: [{
|
|
47
|
-
selector: '[
|
|
137
|
+
selector: 'x-table-header-row, tr[x-table-header-row]',
|
|
138
|
+
template: ROW_TEMPLATE,
|
|
139
|
+
host: {
|
|
140
|
+
class: 'x-table-header-row',
|
|
141
|
+
role: 'row'
|
|
142
|
+
},
|
|
143
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
144
|
+
encapsulation: ViewEncapsulation.None,
|
|
145
|
+
exportAs: 'xTableHeaderRow',
|
|
146
|
+
providers: [{ provide: CdkHeaderRow, useExisting: XTableHeaderRow }],
|
|
147
|
+
imports: [CdkCellOutlet]
|
|
48
148
|
}]
|
|
49
|
-
}], propDecorators: {
|
|
50
|
-
type:
|
|
149
|
+
}], propDecorators: { isSticking: [{
|
|
150
|
+
type: HostBinding,
|
|
151
|
+
args: ['class.x-table-sticky-top']
|
|
51
152
|
}] } });
|
|
52
|
-
class
|
|
153
|
+
class XTableFooterRow extends CdkFooterRow {
|
|
154
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
155
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: XTableFooterRow, isStandalone: true, selector: "x-table-footer-row, tr[x-table-footer-row]", host: { attributes: { "role": "row" }, classAttribute: "x-table-footer-row" }, providers: [{ provide: CdkFooterRow, useExisting: XTableFooterRow }], exportAs: ["xTableFooterRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
156
|
+
}
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterRow, decorators: [{
|
|
158
|
+
type: Component,
|
|
159
|
+
args: [{
|
|
160
|
+
selector: 'x-table-footer-row, tr[x-table-footer-row]',
|
|
161
|
+
template: ROW_TEMPLATE,
|
|
162
|
+
host: {
|
|
163
|
+
class: 'x-table-footer-row',
|
|
164
|
+
role: 'row'
|
|
165
|
+
},
|
|
166
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
167
|
+
encapsulation: ViewEncapsulation.None,
|
|
168
|
+
exportAs: 'xTableFooterRow',
|
|
169
|
+
providers: [{ provide: CdkFooterRow, useExisting: XTableFooterRow }],
|
|
170
|
+
imports: [CdkCellOutlet]
|
|
171
|
+
}]
|
|
172
|
+
}] });
|
|
173
|
+
class XTableViewRow extends CdkRow {
|
|
53
174
|
constructor() {
|
|
175
|
+
super(...arguments);
|
|
54
176
|
this.tableViewService = inject(XTableViewService, { optional: true });
|
|
55
|
-
this.tableView = inject(XTableViewComponent, { optional: true });
|
|
56
|
-
this.elementRef = inject(ElementRef);
|
|
57
|
-
this.cellClass = true;
|
|
58
177
|
}
|
|
59
|
-
get
|
|
60
|
-
return this.tableViewService.
|
|
178
|
+
get isActived() {
|
|
179
|
+
return this.tableViewService.activedRows.includes(this);
|
|
61
180
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
181
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
182
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: XTableViewRow, isStandalone: true, selector: "x-table-row, tr[x-table-row]", host: { attributes: { "role": "row" }, properties: { "class.x-table-row-actived": "this.isActived" }, classAttribute: "x-table-row" }, providers: [{ provide: CdkRow, useExisting: XTableViewRow }], exportAs: ["xTableRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
183
|
+
}
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewRow, decorators: [{
|
|
185
|
+
type: Component,
|
|
186
|
+
args: [{
|
|
187
|
+
selector: 'x-table-row, tr[x-table-row]',
|
|
188
|
+
template: ROW_TEMPLATE,
|
|
189
|
+
host: {
|
|
190
|
+
class: 'x-table-row',
|
|
191
|
+
role: 'row'
|
|
192
|
+
},
|
|
193
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
194
|
+
encapsulation: ViewEncapsulation.None,
|
|
195
|
+
exportAs: 'xTableRow',
|
|
196
|
+
providers: [{ provide: CdkRow, useExisting: XTableViewRow }],
|
|
197
|
+
imports: [CdkCellOutlet]
|
|
198
|
+
}]
|
|
199
|
+
}], propDecorators: { isActived: [{
|
|
200
|
+
type: HostBinding,
|
|
201
|
+
args: ['class.x-table-row-actived']
|
|
202
|
+
}] } });
|
|
203
|
+
class XTableNoDataRow extends CdkNoDataRow {
|
|
204
|
+
constructor() {
|
|
205
|
+
super(...arguments);
|
|
206
|
+
this._contentClassName = 'x-table-no-data-row';
|
|
67
207
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
208
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
209
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableNoDataRow, isStandalone: true, selector: "ng-template[xTableNoDataRow]", providers: [{ provide: CdkNoDataRow, useExisting: XTableNoDataRow }], usesInheritance: true, ngImport: i0 }); }
|
|
210
|
+
}
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableNoDataRow, decorators: [{
|
|
212
|
+
type: Directive,
|
|
213
|
+
args: [{
|
|
214
|
+
selector: 'ng-template[xTableNoDataRow]',
|
|
215
|
+
providers: [{ provide: CdkNoDataRow, useExisting: XTableNoDataRow }]
|
|
216
|
+
}]
|
|
217
|
+
}] });
|
|
218
|
+
|
|
219
|
+
class XTableView extends XTableViewProperty {
|
|
220
|
+
constructor() {
|
|
221
|
+
super(...arguments);
|
|
222
|
+
this.elementRef = inject(ElementRef);
|
|
223
|
+
this.sentinelTop = viewChild('sentinelTop', ...(ngDevMode ? [{ debugName: "sentinelTop" }] : []));
|
|
224
|
+
this.headerRowRef = contentChild(XTableHeaderRowDef, ...(ngDevMode ? [{ debugName: "headerRowRef" }] : []));
|
|
225
|
+
this.headerRowRefs = contentChildren(XTableHeaderRowDef, ...(ngDevMode ? [{ debugName: "headerRowRefs" }] : []));
|
|
226
|
+
this.headerRows = contentChildren(XTableHeaderRow, ...(ngDevMode ? [{ debugName: "headerRows" }] : []));
|
|
227
|
+
this.columnDefs = contentChildren(XTableColumnDef, ...(ngDevMode ? [{ debugName: "columnDefs" }] : []));
|
|
228
|
+
this.headerCells = contentChildren(XTableHeaderCell, ...(ngDevMode ? [{ debugName: "headerCells" }] : []));
|
|
229
|
+
this.cells = contentChildren(XTableViewCell, ...(ngDevMode ? [{ debugName: "cells" }] : []));
|
|
230
|
+
this.rows = contentChildren(XTableViewRow, ...(ngDevMode ? [{ debugName: "rows" }] : []));
|
|
231
|
+
/** Overrides the sticky CSS class set by the `CdkTable`. */
|
|
232
|
+
this.stickyCssClass = 'x-table-sticky';
|
|
233
|
+
/** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */
|
|
234
|
+
this.needsPositionStickyOnElement = false;
|
|
77
235
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
236
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableView, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
237
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: XTableView, isStandalone: true, selector: "x-table-view, table[x-table-view]", host: { properties: { "class.x-table-fixed-layout": "fixedLayout" }, classAttribute: "x-table-view" }, providers: [
|
|
238
|
+
{ provide: CdkTable, useExisting: XTableView },
|
|
239
|
+
{ provide: CDK_TABLE, useExisting: XTableView },
|
|
240
|
+
// Prevent nested tables from seeing this table's StickyPositioningListener.
|
|
241
|
+
{ provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
|
|
242
|
+
{ provide: STICKY_POSITIONING_LISTENER, useValue: null },
|
|
243
|
+
XTableViewService
|
|
244
|
+
], queries: [{ propertyName: "headerRowRef", first: true, predicate: XTableHeaderRowDef, descendants: true, isSignal: true }, { propertyName: "headerRowRefs", predicate: XTableHeaderRowDef, isSignal: true }, { propertyName: "headerRows", predicate: XTableHeaderRow, isSignal: true }, { propertyName: "columnDefs", predicate: XTableColumnDef, isSignal: true }, { propertyName: "headerCells", predicate: XTableHeaderCell, isSignal: true }, { propertyName: "cells", predicate: XTableViewCell, isSignal: true }, { propertyName: "rows", predicate: XTableViewRow, isSignal: true }], viewQueries: [{ propertyName: "sentinelTop", first: true, predicate: ["sentinelTop"], descendants: true, isSignal: true }], exportAs: ["xTableView"], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"caption\" />\r\n<ng-content select=\"colgroup, col\" />\r\n\r\n<!--\r\n Unprojected content throws a hydration error so we need this to capture it.\r\n It gets removed on the client so it doesn't affect the layout.\r\n -->\r\n@if (_isServer) {\r\n <ng-content />\r\n}\r\n<div class=\"x-table-sentinel-top\" #sentinelTop></div>\r\n@if (_isNativeHtmlTable) {\r\n <thead>\r\n <ng-container headerRowOutlet />\r\n </thead>\r\n <tbody>\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n </tbody>\r\n <tfoot>\r\n <ng-container footerRowOutlet />\r\n </tfoot>\r\n} @else {\r\n <ng-container headerRowOutlet />\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n <ng-container footerRowOutlet />\r\n}\r\n", styles: [".x-table-view{margin:0;padding:0}.x-table-view{position:relative;border-collapse:separate;border-spacing:0}.x-table-view .x-table-header-cell,.x-table-view .x-table-footer-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;background-color:var(--x-background);white-space:nowrap}.x-table-view .x-table-header-cell:first-child,.x-table-view .x-table-footer-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-header-cell.x-table-header-cell-actived,.x-table-view .x-table-footer-cell.x-table-header-cell-actived{background-color:var(--x-background-a100)}.x-table-view .x-table-sticky{position:sticky;background-color:var(--x-background-a200)}.x-table-view .x-table-sentinel-top{visibility:hidden;position:absolute;top:0}.x-table-view .x-table-row-actived .x-table-cell:not(.x-table-cell-selected){background-color:var(--x-background-a100)}.x-table-view .x-table-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;white-space:nowrap;background-color:var(--x-background)}.x-table-view .x-table-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-cell.x-table-cell-selected{border-color:var(--x-border-a200);background-color:var(--x-primary-900)}.x-table-view .x-table-cell.x-table-sticky:not(.x-table-cell-selected){background-color:var(--x-background-a200)}.x-table-view .x-table-sticky-border-elem-top{border-bottom-style:solid;border-bottom-width:calc(2 * var(--x-border-width));border-bottom-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-bottom{border-top-style:solid;border-top-width:calc(2 * var(--x-border-width));border-top-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-left{border-right-style:solid;border-right-width:calc(2 * var(--x-border-width));border-right-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-right{border-left-style:solid;border-left-width:calc(2 * var(--x-border-width));border-left-color:var(--x-border-a900)}\n"], dependencies: [{ kind: "directive", type: HeaderRowOutlet, selector: "[headerRowOutlet]" }, { kind: "directive", type: DataRowOutlet, selector: "[rowOutlet]" }, { kind: "directive", type: NoDataRowOutlet, selector: "[noDataRowOutlet]" }, { kind: "directive", type: FooterRowOutlet, selector: "[footerRowOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
245
|
+
}
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableView, decorators: [{
|
|
247
|
+
type: Component,
|
|
248
|
+
args: [{ selector: 'x-table-view, table[x-table-view]', exportAs: 'xTableView', host: {
|
|
249
|
+
class: 'x-table-view',
|
|
250
|
+
'[class.x-table-fixed-layout]': 'fixedLayout'
|
|
251
|
+
}, providers: [
|
|
252
|
+
{ provide: CdkTable, useExisting: XTableView },
|
|
253
|
+
{ provide: CDK_TABLE, useExisting: XTableView },
|
|
254
|
+
// Prevent nested tables from seeing this table's StickyPositioningListener.
|
|
255
|
+
{ provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
|
|
256
|
+
{ provide: STICKY_POSITIONING_LISTENER, useValue: null },
|
|
257
|
+
XTableViewService
|
|
258
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet], template: "<ng-content select=\"caption\" />\r\n<ng-content select=\"colgroup, col\" />\r\n\r\n<!--\r\n Unprojected content throws a hydration error so we need this to capture it.\r\n It gets removed on the client so it doesn't affect the layout.\r\n -->\r\n@if (_isServer) {\r\n <ng-content />\r\n}\r\n<div class=\"x-table-sentinel-top\" #sentinelTop></div>\r\n@if (_isNativeHtmlTable) {\r\n <thead>\r\n <ng-container headerRowOutlet />\r\n </thead>\r\n <tbody>\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n </tbody>\r\n <tfoot>\r\n <ng-container footerRowOutlet />\r\n </tfoot>\r\n} @else {\r\n <ng-container headerRowOutlet />\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n <ng-container footerRowOutlet />\r\n}\r\n", styles: [".x-table-view{margin:0;padding:0}.x-table-view{position:relative;border-collapse:separate;border-spacing:0}.x-table-view .x-table-header-cell,.x-table-view .x-table-footer-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;background-color:var(--x-background);white-space:nowrap}.x-table-view .x-table-header-cell:first-child,.x-table-view .x-table-footer-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-header-cell.x-table-header-cell-actived,.x-table-view .x-table-footer-cell.x-table-header-cell-actived{background-color:var(--x-background-a100)}.x-table-view .x-table-sticky{position:sticky;background-color:var(--x-background-a200)}.x-table-view .x-table-sentinel-top{visibility:hidden;position:absolute;top:0}.x-table-view .x-table-row-actived .x-table-cell:not(.x-table-cell-selected){background-color:var(--x-background-a100)}.x-table-view .x-table-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;white-space:nowrap;background-color:var(--x-background)}.x-table-view .x-table-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-cell.x-table-cell-selected{border-color:var(--x-border-a200);background-color:var(--x-primary-900)}.x-table-view .x-table-cell.x-table-sticky:not(.x-table-cell-selected){background-color:var(--x-background-a200)}.x-table-view .x-table-sticky-border-elem-top{border-bottom-style:solid;border-bottom-width:calc(2 * var(--x-border-width));border-bottom-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-bottom{border-top-style:solid;border-top-width:calc(2 * var(--x-border-width));border-top-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-left{border-right-style:solid;border-right-width:calc(2 * var(--x-border-width));border-right-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-right{border-left-style:solid;border-left-width:calc(2 * var(--x-border-width));border-left-color:var(--x-border-a900)}\n"] }]
|
|
259
|
+
}] });
|
|
260
|
+
|
|
261
|
+
class XTableViewCellDef extends CdkCellDef {
|
|
262
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
263
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableViewCellDef, isStandalone: true, selector: "[xTableCellDef]", providers: [{ provide: CdkCellDef, useExisting: XTableViewCellDef }], usesInheritance: true, ngImport: i0 }); }
|
|
264
|
+
}
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewCellDef, decorators: [{
|
|
266
|
+
type: Directive,
|
|
267
|
+
args: [{
|
|
268
|
+
selector: '[xTableCellDef]',
|
|
269
|
+
providers: [{ provide: CdkCellDef, useExisting: XTableViewCellDef }]
|
|
270
|
+
}]
|
|
271
|
+
}] });
|
|
272
|
+
class XTableHeaderCellDef extends CdkHeaderCellDef {
|
|
273
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
274
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableHeaderCellDef, isStandalone: true, selector: "[xTableHeaderCellDef]", providers: [{ provide: CdkHeaderCellDef, useExisting: XTableHeaderCellDef }], usesInheritance: true, ngImport: i0 }); }
|
|
275
|
+
}
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderCellDef, decorators: [{
|
|
277
|
+
type: Directive,
|
|
278
|
+
args: [{
|
|
279
|
+
selector: '[xTableHeaderCellDef]',
|
|
280
|
+
providers: [{ provide: CdkHeaderCellDef, useExisting: XTableHeaderCellDef }]
|
|
281
|
+
}]
|
|
282
|
+
}] });
|
|
283
|
+
class XTableFooterCellDef extends CdkFooterCellDef {
|
|
284
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
285
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableFooterCellDef, isStandalone: true, selector: "[xTableFooterCellDef]", providers: [{ provide: CdkFooterCellDef, useExisting: XTableFooterCellDef }], usesInheritance: true, ngImport: i0 }); }
|
|
286
|
+
}
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterCellDef, decorators: [{
|
|
288
|
+
type: Directive,
|
|
289
|
+
args: [{
|
|
290
|
+
selector: '[xTableFooterCellDef]',
|
|
291
|
+
providers: [{ provide: CdkFooterCellDef, useExisting: XTableFooterCellDef }]
|
|
292
|
+
}]
|
|
293
|
+
}] });
|
|
294
|
+
class XTableColumnDef extends CdkColumnDef {
|
|
295
|
+
get name() {
|
|
296
|
+
return this._name;
|
|
86
297
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return -1;
|
|
90
|
-
const cellsArray = this.tableView.cells.toArray();
|
|
91
|
-
const selectedIndex = cellsArray.indexOf(cell);
|
|
92
|
-
if (selectedIndex === -1)
|
|
93
|
-
return -1;
|
|
94
|
-
const columnsPerRow = this.tableView.columns().length;
|
|
95
|
-
const rowsCount = this.tableView.data().length;
|
|
96
|
-
if (columnsPerRow === 0 || rowsCount === 0)
|
|
97
|
-
return -1;
|
|
98
|
-
return Math.floor(selectedIndex / rowsCount);
|
|
298
|
+
set name(name) {
|
|
299
|
+
this._setNameInput(name);
|
|
99
300
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const cellsArray = this.tableView.cells.toArray();
|
|
104
|
-
const selectedIndex = cellsArray.indexOf(cell);
|
|
105
|
-
if (selectedIndex === -1)
|
|
106
|
-
return -1;
|
|
107
|
-
const columnsPerRow = this.tableView.columns().length;
|
|
108
|
-
const rowsCount = this.tableView.data().length;
|
|
109
|
-
if (columnsPerRow === 0 || rowsCount === 0)
|
|
110
|
-
return -1;
|
|
111
|
-
return selectedIndex % rowsCount;
|
|
301
|
+
_updateColumnCssClassName() {
|
|
302
|
+
super._updateColumnCssClassName();
|
|
303
|
+
this._columnCssClassName.push(`x-table-column-${this.cssClassFriendlyName}`);
|
|
112
304
|
}
|
|
113
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
114
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
305
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
306
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableColumnDef, isStandalone: true, selector: "[xTableColumnDef]", inputs: { name: ["xTableColumnDef", "name"] }, providers: [{ provide: CdkColumnDef, useExisting: XTableColumnDef }], usesInheritance: true, ngImport: i0 }); }
|
|
115
307
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableColumnDef, decorators: [{
|
|
117
309
|
type: Directive,
|
|
118
310
|
args: [{
|
|
119
|
-
selector: '
|
|
311
|
+
selector: '[xTableColumnDef]',
|
|
312
|
+
providers: [{ provide: CdkColumnDef, useExisting: XTableColumnDef }]
|
|
120
313
|
}]
|
|
121
|
-
}], propDecorators: {
|
|
122
|
-
type:
|
|
123
|
-
args: ['
|
|
124
|
-
}], isSelected: [{
|
|
125
|
-
type: HostBinding,
|
|
126
|
-
args: ['class.x-cell-selected']
|
|
127
|
-
}], onClick: [{
|
|
128
|
-
type: HostListener,
|
|
129
|
-
args: ['click']
|
|
314
|
+
}], propDecorators: { name: [{
|
|
315
|
+
type: Input,
|
|
316
|
+
args: ['xTableColumnDef']
|
|
130
317
|
}] } });
|
|
131
|
-
class
|
|
318
|
+
class XTableHeaderCell extends CdkHeaderCell {
|
|
132
319
|
constructor() {
|
|
320
|
+
super(...arguments);
|
|
133
321
|
this.tableViewService = inject(XTableViewService, { optional: true });
|
|
134
|
-
this.tableView = inject(
|
|
135
|
-
this.
|
|
322
|
+
this.tableView = inject(XTableView, { optional: true });
|
|
323
|
+
this.elementRef = inject(ElementRef);
|
|
136
324
|
}
|
|
137
325
|
get isActived() {
|
|
138
|
-
return this.tableViewService.
|
|
326
|
+
return this.tableViewService.activedHeaderCells.includes(this);
|
|
139
327
|
}
|
|
140
328
|
onClick() {
|
|
141
|
-
this.tableViewService.
|
|
142
|
-
const headerCells = this.tableView?.headerCells
|
|
329
|
+
this.tableViewService.activedHeaderCells = [this];
|
|
330
|
+
const headerCells = this.tableView?.headerCells() ?? [];
|
|
143
331
|
const index = headerCells.indexOf(this);
|
|
144
|
-
const cells = this.tableView?.cells
|
|
145
|
-
const columnsCount = this.tableView?.
|
|
146
|
-
const rowsCount = this.tableView?.
|
|
332
|
+
const cells = this.tableView?.cells() ?? [];
|
|
333
|
+
const columnsCount = (this.tableView?.headerRowRef()?.columns).length ?? 0;
|
|
334
|
+
const rowsCount = this.tableView?.rows().length ?? 0;
|
|
147
335
|
if (columnsCount === 0 || rowsCount === 0) {
|
|
148
336
|
return;
|
|
149
337
|
}
|
|
@@ -160,180 +348,240 @@ class XHeaderCell {
|
|
|
160
348
|
cell.setActivedRow(cell);
|
|
161
349
|
}
|
|
162
350
|
}
|
|
163
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
164
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
351
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
352
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableHeaderCell, isStandalone: true, selector: "x-table-header-cell, th[x-table-header-cell]", host: { attributes: { "role": "columnheader" }, listeners: { "click": "onClick()" }, properties: { "class.x-table-header-cell-actived": "this.isActived" }, classAttribute: "x-table-header-cell" }, usesInheritance: true, ngImport: i0 }); }
|
|
165
353
|
}
|
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableHeaderCell, decorators: [{
|
|
167
355
|
type: Directive,
|
|
168
356
|
args: [{
|
|
169
|
-
selector: 'x-header-cell, th[x-header-cell]'
|
|
357
|
+
selector: 'x-table-header-cell, th[x-table-header-cell]',
|
|
358
|
+
host: {
|
|
359
|
+
class: 'x-table-header-cell',
|
|
360
|
+
role: 'columnheader'
|
|
361
|
+
}
|
|
170
362
|
}]
|
|
171
|
-
}], propDecorators: {
|
|
172
|
-
type: HostBinding,
|
|
173
|
-
args: ['class.x-header-cell']
|
|
174
|
-
}], isActived: [{
|
|
363
|
+
}], propDecorators: { isActived: [{
|
|
175
364
|
type: HostBinding,
|
|
176
|
-
args: ['class.x-header-cell-actived']
|
|
365
|
+
args: ['class.x-table-header-cell-actived']
|
|
177
366
|
}], onClick: [{
|
|
178
367
|
type: HostListener,
|
|
179
368
|
args: ['click']
|
|
180
369
|
}] } });
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/** @nocollapse */ static { this.ɵ
|
|
184
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: XColumnDef, isStandalone: true, selector: "[xColumnDef]", inputs: { name: ["xColumnDef", "name"] }, queries: [{ propertyName: "cell", first: true, predicate: XCellDef, descendants: true, static: true }, { propertyName: "header", first: true, predicate: XHeaderCellDef, descendants: true, static: true }], ngImport: i0 }); }
|
|
370
|
+
class XTableFooterCell extends CdkFooterCell {
|
|
371
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
372
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableFooterCell, isStandalone: true, selector: "x-table-footer-cell, td[x-table-footer-cell]", host: { classAttribute: "x-table-footer-cell" }, usesInheritance: true, ngImport: i0 }); }
|
|
185
373
|
}
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableFooterCell, decorators: [{
|
|
187
375
|
type: Directive,
|
|
188
376
|
args: [{
|
|
189
|
-
selector: '[
|
|
377
|
+
selector: 'x-table-footer-cell, td[x-table-footer-cell]',
|
|
378
|
+
host: {
|
|
379
|
+
class: 'x-table-footer-cell'
|
|
380
|
+
}
|
|
190
381
|
}]
|
|
191
|
-
}]
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
type: ContentChild,
|
|
199
|
-
args: [XHeaderCellDef, { static: true }]
|
|
200
|
-
}] } });
|
|
201
|
-
|
|
202
|
-
class XRowDef {
|
|
203
|
-
constructor(vcr, tpl) {
|
|
204
|
-
this.vcr = vcr;
|
|
205
|
-
this.tpl = tpl;
|
|
382
|
+
}] });
|
|
383
|
+
class XTableViewCell extends CdkCell {
|
|
384
|
+
constructor() {
|
|
385
|
+
super(...arguments);
|
|
386
|
+
this.tableViewService = inject(XTableViewService, { optional: true });
|
|
387
|
+
this.tableView = inject(XTableView, { optional: true });
|
|
388
|
+
this.elementRef = inject(ElementRef);
|
|
206
389
|
}
|
|
207
|
-
|
|
208
|
-
this.
|
|
390
|
+
get isSelected() {
|
|
391
|
+
return this.tableViewService.selectedCells.includes(this);
|
|
209
392
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
args: [{
|
|
216
|
-
selector: '[xRowDef]'
|
|
217
|
-
}]
|
|
218
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }], propDecorators: { rowData: [{
|
|
219
|
-
type: Input,
|
|
220
|
-
args: ['xRowDef']
|
|
221
|
-
}] } });
|
|
222
|
-
class XHeaderRowDef {
|
|
223
|
-
constructor(vcr, tpl) {
|
|
224
|
-
this.vcr = vcr;
|
|
225
|
-
this.tpl = tpl;
|
|
393
|
+
onClick() {
|
|
394
|
+
this.tableViewService.selectedCells = [this];
|
|
395
|
+
this.tableViewService.activedRows = [];
|
|
396
|
+
this.setActivedRow(this);
|
|
397
|
+
this.setActivedColumn(this);
|
|
226
398
|
}
|
|
227
|
-
|
|
228
|
-
this.
|
|
399
|
+
setActivedRow(cell) {
|
|
400
|
+
const rows = this.tableView?.rows() ?? [];
|
|
401
|
+
if (rows.length > 0) {
|
|
402
|
+
const rowIndex = this.getRowIndex(cell);
|
|
403
|
+
if (rowIndex >= 0 && rowIndex < rows.length) {
|
|
404
|
+
const currentRow = rows[rowIndex];
|
|
405
|
+
this.tableViewService.activedRows.push(currentRow);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
229
408
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
409
|
+
setActivedColumn(cell) {
|
|
410
|
+
const headerCells = (this.tableView?.headerCells() ?? []);
|
|
411
|
+
const headerRowRefs = this.tableView?.headerRowRefs() ?? [];
|
|
412
|
+
const headerCellsArray = this.convertToColumnBasedArray(headerCells, headerRowRefs.length);
|
|
413
|
+
const activedHeaderCells = [];
|
|
414
|
+
for (let cells of headerCellsArray) {
|
|
415
|
+
if (cells.length > 0) {
|
|
416
|
+
const columnIndex = this.getColumnIndex(cell);
|
|
417
|
+
if (columnIndex >= 0 && columnIndex < cells.length) {
|
|
418
|
+
activedHeaderCells.push(cells[columnIndex]);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
this.tableViewService.activedHeaderCells = activedHeaderCells;
|
|
243
423
|
}
|
|
244
|
-
|
|
245
|
-
|
|
424
|
+
convertToColumnBasedArray(input, columnsPerRow) {
|
|
425
|
+
const result = [];
|
|
426
|
+
for (let i = 0; i < columnsPerRow; i++) {
|
|
427
|
+
result.push([]);
|
|
428
|
+
}
|
|
429
|
+
for (let i = 0; i < input.length; i++) {
|
|
430
|
+
const columnIndex = i % columnsPerRow;
|
|
431
|
+
result[columnIndex].push(input[i]);
|
|
432
|
+
}
|
|
433
|
+
return result;
|
|
434
|
+
}
|
|
435
|
+
getColumnIndex(cell) {
|
|
436
|
+
if (!this.tableView || !this.tableView.cells())
|
|
437
|
+
return -1;
|
|
438
|
+
const cellsArray = this.tableView.cells();
|
|
439
|
+
const selectedIndex = cellsArray.indexOf(cell);
|
|
440
|
+
if (selectedIndex === -1)
|
|
441
|
+
return -1;
|
|
442
|
+
const columnsPerRow = (this.tableView.headerRowRef()?.columns).length ?? 0;
|
|
443
|
+
const rowsCount = this.tableView.rows().length;
|
|
444
|
+
if (columnsPerRow === 0 || rowsCount === 0)
|
|
445
|
+
return -1;
|
|
446
|
+
return Math.floor(selectedIndex / rowsCount);
|
|
447
|
+
}
|
|
448
|
+
getRowIndex(cell) {
|
|
449
|
+
if (!this.tableView || !this.tableView.cells())
|
|
450
|
+
return -1;
|
|
451
|
+
const cellsArray = this.tableView.cells();
|
|
452
|
+
const selectedIndex = cellsArray.indexOf(cell);
|
|
453
|
+
if (selectedIndex === -1)
|
|
454
|
+
return -1;
|
|
455
|
+
const columnsPerRow = (this.tableView.headerRowRef()?.columns).length ?? 0;
|
|
456
|
+
const rowsCount = this.tableView.rows().length;
|
|
457
|
+
if (columnsPerRow === 0 || rowsCount === 0)
|
|
458
|
+
return -1;
|
|
459
|
+
return selectedIndex % rowsCount;
|
|
246
460
|
}
|
|
247
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
248
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
461
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
462
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: XTableViewCell, isStandalone: true, selector: "x-table-cell, td[x-table-cell]", host: { listeners: { "click": "onClick()" }, properties: { "class.x-table-cell-selected": "this.isSelected" }, classAttribute: "x-table-cell" }, usesInheritance: true, ngImport: i0 }); }
|
|
249
463
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewCell, decorators: [{
|
|
251
465
|
type: Directive,
|
|
252
466
|
args: [{
|
|
253
|
-
selector: 'x-
|
|
467
|
+
selector: 'x-table-cell, td[x-table-cell]',
|
|
468
|
+
host: {
|
|
469
|
+
class: 'x-table-cell'
|
|
470
|
+
}
|
|
254
471
|
}]
|
|
255
|
-
}], propDecorators: {
|
|
472
|
+
}], propDecorators: { isSelected: [{
|
|
256
473
|
type: HostBinding,
|
|
257
|
-
args: ['class.x-
|
|
474
|
+
args: ['class.x-table-cell-selected']
|
|
475
|
+
}], onClick: [{
|
|
476
|
+
type: HostListener,
|
|
477
|
+
args: ['click']
|
|
258
478
|
}] } });
|
|
259
479
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
super(...arguments);
|
|
273
|
-
/**
|
|
274
|
-
* @zh_CN 数据
|
|
275
|
-
* @en_US Row data
|
|
276
|
-
*/
|
|
277
|
-
this.data = input([]);
|
|
278
|
-
/**
|
|
279
|
-
* @zh_CN 列数据
|
|
280
|
-
* @en_US Columns data
|
|
281
|
-
*/
|
|
282
|
-
this.columns = input([]);
|
|
283
|
-
}
|
|
284
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XTableViewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
285
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: XTableViewProperty, isStandalone: true, selector: "x-table-view-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
480
|
+
class XTableTextColumn extends CdkTextColumn {
|
|
481
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
482
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: XTableTextColumn, isStandalone: true, selector: "x-table-text-column", usesInheritance: true, ngImport: i0, template: `
|
|
483
|
+
<ng-container xTableColumnDef>
|
|
484
|
+
<th x-table-header-cell *xTableHeaderCellDef [style.text-align]="justify">
|
|
485
|
+
{{ headerText }}
|
|
486
|
+
</th>
|
|
487
|
+
<td x-table-cell *xTableCellDef="let data" [style.text-align]="justify">
|
|
488
|
+
{{ dataAccessor(data, name) }}
|
|
489
|
+
</td>
|
|
490
|
+
</ng-container>
|
|
491
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: XTableColumnDef, selector: "[xTableColumnDef]", inputs: ["xTableColumnDef"] }, { kind: "directive", type: XTableHeaderCellDef, selector: "[xTableHeaderCellDef]" }, { kind: "directive", type: XTableHeaderCell, selector: "x-table-header-cell, th[x-table-header-cell]" }, { kind: "directive", type: XTableViewCellDef, selector: "[xTableCellDef]" }, { kind: "directive", type: XTableViewCell, selector: "x-table-cell, td[x-table-cell]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
286
492
|
}
|
|
287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableTextColumn, decorators: [{
|
|
288
494
|
type: Component,
|
|
289
|
-
args: [{
|
|
495
|
+
args: [{
|
|
496
|
+
selector: 'x-table-text-column',
|
|
497
|
+
template: `
|
|
498
|
+
<ng-container xTableColumnDef>
|
|
499
|
+
<th x-table-header-cell *xTableHeaderCellDef [style.text-align]="justify">
|
|
500
|
+
{{ headerText }}
|
|
501
|
+
</th>
|
|
502
|
+
<td x-table-cell *xTableCellDef="let data" [style.text-align]="justify">
|
|
503
|
+
{{ dataAccessor(data, name) }}
|
|
504
|
+
</td>
|
|
505
|
+
</ng-container>
|
|
506
|
+
`,
|
|
507
|
+
encapsulation: ViewEncapsulation.None,
|
|
508
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
509
|
+
imports: [XTableColumnDef, XTableHeaderCellDef, XTableHeaderCell, XTableViewCellDef, XTableViewCell]
|
|
510
|
+
}]
|
|
290
511
|
}] });
|
|
291
512
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
type: ContentChildren,
|
|
315
|
-
args: [XColumnDef]
|
|
316
|
-
}], headerCells: [{
|
|
317
|
-
type: ContentChildren,
|
|
318
|
-
args: [XHeaderCell]
|
|
319
|
-
}], cells: [{
|
|
320
|
-
type: ContentChildren,
|
|
321
|
-
args: [XCell]
|
|
322
|
-
}], rows: [{
|
|
323
|
-
type: ViewChildren,
|
|
324
|
-
args: [XRow]
|
|
325
|
-
}] } });
|
|
326
|
-
|
|
513
|
+
const EXPORTED_DECLARATIONS = [
|
|
514
|
+
// Table
|
|
515
|
+
XTableView,
|
|
516
|
+
// Template defs
|
|
517
|
+
XTableHeaderCellDef,
|
|
518
|
+
XTableHeaderRowDef,
|
|
519
|
+
XTableColumnDef,
|
|
520
|
+
XTableViewCellDef,
|
|
521
|
+
XTableViewRowDef,
|
|
522
|
+
XTableFooterCellDef,
|
|
523
|
+
XTableFooterRowDef,
|
|
524
|
+
// Cell directives
|
|
525
|
+
XTableHeaderCell,
|
|
526
|
+
XTableViewCell,
|
|
527
|
+
XTableFooterCell,
|
|
528
|
+
// Row directives
|
|
529
|
+
XTableHeaderRow,
|
|
530
|
+
XTableViewRow,
|
|
531
|
+
XTableFooterRow,
|
|
532
|
+
XTableNoDataRow,
|
|
533
|
+
XTableTextColumn
|
|
534
|
+
];
|
|
327
535
|
class XTableViewModule {
|
|
328
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
329
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
330
|
-
|
|
536
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
537
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: XTableViewModule, imports: [CdkTableModule,
|
|
538
|
+
// Table
|
|
539
|
+
XTableView,
|
|
540
|
+
// Template defs
|
|
541
|
+
XTableHeaderCellDef,
|
|
542
|
+
XTableHeaderRowDef,
|
|
543
|
+
XTableColumnDef,
|
|
544
|
+
XTableViewCellDef,
|
|
545
|
+
XTableViewRowDef,
|
|
546
|
+
XTableFooterCellDef,
|
|
547
|
+
XTableFooterRowDef,
|
|
548
|
+
// Cell directives
|
|
549
|
+
XTableHeaderCell,
|
|
550
|
+
XTableViewCell,
|
|
551
|
+
XTableFooterCell,
|
|
552
|
+
// Row directives
|
|
553
|
+
XTableHeaderRow,
|
|
554
|
+
XTableViewRow,
|
|
555
|
+
XTableFooterRow,
|
|
556
|
+
XTableNoDataRow,
|
|
557
|
+
XTableTextColumn], exports: [
|
|
558
|
+
// Table
|
|
559
|
+
XTableView,
|
|
560
|
+
// Template defs
|
|
561
|
+
XTableHeaderCellDef,
|
|
562
|
+
XTableHeaderRowDef,
|
|
563
|
+
XTableColumnDef,
|
|
564
|
+
XTableViewCellDef,
|
|
565
|
+
XTableViewRowDef,
|
|
566
|
+
XTableFooterCellDef,
|
|
567
|
+
XTableFooterRowDef,
|
|
568
|
+
// Cell directives
|
|
569
|
+
XTableHeaderCell,
|
|
570
|
+
XTableViewCell,
|
|
571
|
+
XTableFooterCell,
|
|
572
|
+
// Row directives
|
|
573
|
+
XTableHeaderRow,
|
|
574
|
+
XTableViewRow,
|
|
575
|
+
XTableFooterRow,
|
|
576
|
+
XTableNoDataRow,
|
|
577
|
+
XTableTextColumn] }); }
|
|
578
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewModule, imports: [CdkTableModule] }); }
|
|
331
579
|
}
|
|
332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTableViewModule, decorators: [{
|
|
333
581
|
type: NgModule,
|
|
334
582
|
args: [{
|
|
335
|
-
exports: [
|
|
336
|
-
imports: [
|
|
583
|
+
exports: [...EXPORTED_DECLARATIONS],
|
|
584
|
+
imports: [CdkTableModule, ...EXPORTED_DECLARATIONS]
|
|
337
585
|
}]
|
|
338
586
|
}] });
|
|
339
587
|
|
|
@@ -341,5 +589,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
341
589
|
* Generated bundle index. Do not edit.
|
|
342
590
|
*/
|
|
343
591
|
|
|
344
|
-
export {
|
|
592
|
+
export { XTableColumnDef, XTableFooterCell, XTableFooterCellDef, XTableFooterRow, XTableFooterRowDef, XTableHeaderCell, XTableHeaderCellDef, XTableHeaderRow, XTableHeaderRowDef, XTableNoDataRow, XTableTextColumn, XTableView, XTableViewCell, XTableViewCellDef, XTableViewModule, XTableViewPrefix, XTableViewProperty, XTableViewRow, XTableViewRowDef };
|
|
345
593
|
//# sourceMappingURL=ng-nest-ui-table-view.mjs.map
|