@cute-widgets/base 20.0.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/CHANGELOG.md +1 -0
- package/LICENSE.md +191 -0
- package/README.md +190 -0
- package/abstract/index.d.ts +327 -0
- package/alert/index.d.ts +68 -0
- package/autocomplete/index.d.ts +442 -0
- package/badge/index.d.ts +26 -0
- package/bottom-sheet/index.d.ts +231 -0
- package/button/index.d.ts +182 -0
- package/button-toggle/index.d.ts +225 -0
- package/card/index.d.ts +163 -0
- package/checkbox/index.d.ts +174 -0
- package/chips/index.d.ts +963 -0
- package/collapse/index.d.ts +97 -0
- package/core/animation/index.d.ts +43 -0
- package/core/datetime/index.d.ts +404 -0
- package/core/directives/index.d.ts +168 -0
- package/core/error/index.d.ts +74 -0
- package/core/index.d.ts +1039 -0
- package/core/interfaces/index.d.ts +114 -0
- package/core/layout/index.d.ts +53 -0
- package/core/line/index.d.ts +37 -0
- package/core/nav/index.d.ts +321 -0
- package/core/observers/index.d.ts +124 -0
- package/core/option/index.d.ts +185 -0
- package/core/pipes/index.d.ts +53 -0
- package/core/ripple/index.d.ts +66 -0
- package/core/testing/index.d.ts +154 -0
- package/core/theming/index.d.ts +118 -0
- package/core/types/index.d.ts +53 -0
- package/core/utils/index.d.ts +129 -0
- package/cute-widgets-base-20.0.1.tgz +0 -0
- package/datepicker/index.d.ts +1817 -0
- package/dialog/index.d.ts +484 -0
- package/divider/index.d.ts +24 -0
- package/expansion/README.md +8 -0
- package/expansion/index.d.ts +308 -0
- package/fesm2022/cute-widgets-base-abstract.mjs +547 -0
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-alert.mjs +198 -0
- package/fesm2022/cute-widgets-base-alert.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-autocomplete.mjs +1217 -0
- package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-badge.mjs +75 -0
- package/fesm2022/cute-widgets-base-badge.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs +416 -0
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-button-toggle.mjs +640 -0
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-button.mjs +546 -0
- package/fesm2022/cute-widgets-base-button.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-card.mjs +471 -0
- package/fesm2022/cute-widgets-base-card.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-checkbox.mjs +390 -0
- package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-chips.mjs +2360 -0
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-collapse.mjs +259 -0
- package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-animation.mjs +53 -0
- package/fesm2022/cute-widgets-base-core-animation.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-datetime.mjs +568 -0
- package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-directives.mjs +404 -0
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-error.mjs +105 -0
- package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-interfaces.mjs +22 -0
- package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-layout.mjs +74 -0
- package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-line.mjs +87 -0
- package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-nav.mjs +863 -0
- package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-observers.mjs +304 -0
- package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-option.mjs +373 -0
- package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-pipes.mjs +97 -0
- package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-ripple.mjs +172 -0
- package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-testing.mjs +210 -0
- package/fesm2022/cute-widgets-base-core-testing.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-theming.mjs +314 -0
- package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-types.mjs +22 -0
- package/fesm2022/cute-widgets-base-core-types.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-utils.mjs +257 -0
- package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core.mjs +1600 -0
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-datepicker.mjs +4827 -0
- package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-dialog.mjs +1046 -0
- package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-divider.mjs +86 -0
- package/fesm2022/cute-widgets-base-divider.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-expansion.mjs +623 -0
- package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-form-field.mjs +969 -0
- package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-grid-list.mjs +715 -0
- package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-icon.mjs +1105 -0
- package/fesm2022/cute-widgets-base-icon.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-input.mjs +726 -0
- package/fesm2022/cute-widgets-base-input.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-layout-container.mjs +95 -0
- package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-layout-stack.mjs +166 -0
- package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-layout.mjs +250 -0
- package/fesm2022/cute-widgets-base-layout.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-list.mjs +1557 -0
- package/fesm2022/cute-widgets-base-list.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-menu.mjs +1283 -0
- package/fesm2022/cute-widgets-base-menu.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-navbar.mjs +359 -0
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-paginator.mjs +485 -0
- package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-progress.mjs +321 -0
- package/fesm2022/cute-widgets-base-progress.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-radio.mjs +637 -0
- package/fesm2022/cute-widgets-base-radio.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-select.mjs +1208 -0
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-sidenav.mjs +1095 -0
- package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-slider.mjs +99 -0
- package/fesm2022/cute-widgets-base-slider.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-snack-bar.mjs +897 -0
- package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-sort.mjs +639 -0
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-spinner.mjs +154 -0
- package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-stepper.mjs +673 -0
- package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-table.mjs +1023 -0
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-tabs.mjs +729 -0
- package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-timepicker.mjs +965 -0
- package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-toolbar.mjs +120 -0
- package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-tooltip.mjs +947 -0
- package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-tree.mjs +598 -0
- package/fesm2022/cute-widgets-base-tree.mjs.map +1 -0
- package/fesm2022/cute-widgets-base.mjs +68 -0
- package/fesm2022/cute-widgets-base.mjs.map +1 -0
- package/form-field/index.d.ts +401 -0
- package/grid-list/index.d.ts +361 -0
- package/icon/index.d.ts +477 -0
- package/index.d.ts +3 -0
- package/input/index.d.ts +256 -0
- package/layout/container/index.d.ts +31 -0
- package/layout/index.d.ts +78 -0
- package/layout/stack/index.d.ts +52 -0
- package/list/index.d.ts +659 -0
- package/menu/index.d.ts +497 -0
- package/navbar/index.d.ts +91 -0
- package/package.json +279 -0
- package/paginator/index.d.ts +216 -0
- package/progress/index.d.ts +130 -0
- package/radio/index.d.ts +259 -0
- package/select/index.d.ts +426 -0
- package/sidenav/index.d.ts +369 -0
- package/slider/index.d.ts +48 -0
- package/snack-bar/index.d.ts +374 -0
- package/sort/index.d.ts +334 -0
- package/spinner/index.d.ts +70 -0
- package/stepper/index.d.ts +295 -0
- package/table/index.d.ts +395 -0
- package/tabs/index.d.ts +307 -0
- package/timepicker/index.d.ts +350 -0
- package/toolbar/index.d.ts +36 -0
- package/tooltip/index.d.ts +299 -0
- package/tree/index.d.ts +314 -0
package/table/index.d.ts
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnInit } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/cdk/table';
|
|
4
|
+
import { CdkTable, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CdkFooterRow, CdkRow, CdkNoDataRow, CdkTextColumn } from '@angular/cdk/table';
|
|
5
|
+
import { ThemeColor } from '@cute-widgets/base/core';
|
|
6
|
+
import { BehaviorSubject } from 'rxjs';
|
|
7
|
+
import { DataSource } from '@angular/cdk/collections';
|
|
8
|
+
import { CuteSort } from '@cute-widgets/base/sort';
|
|
9
|
+
import { CutePaginator } from '@cute-widgets/base/paginator';
|
|
10
|
+
import * as i1 from '@angular/common';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @license Apache-2.0
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
16
|
+
*
|
|
17
|
+
* You may not use this file except in compliance with the License
|
|
18
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*
|
|
20
|
+
* This code is a modification of the `@angular/material` original
|
|
21
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Used to provide a table to some of the subcomponents without causing a circular dependency.
|
|
26
|
+
*/
|
|
27
|
+
declare const CUTE_TABLE: InjectionToken<CuteTable<any>>;
|
|
28
|
+
/** Type of table borders. `all` - on all sides of the table and cells, `none` - without borders */
|
|
29
|
+
type TableBorders = "all" | "none";
|
|
30
|
+
/**
|
|
31
|
+
* Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
|
|
32
|
+
* tables that animate rows.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated This directive is a no-op and will be removed.
|
|
35
|
+
* @breaking-change 23.0.0
|
|
36
|
+
*/
|
|
37
|
+
declare class CuteRecycleRows {
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteRecycleRows, never>;
|
|
39
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteRecycleRows, "cute-table[recycleRows], table[cute-table][recycleRows]", never, {}, {}, never, never, true, never>;
|
|
40
|
+
}
|
|
41
|
+
declare class CuteTable<T> extends CdkTable<T> implements OnInit {
|
|
42
|
+
/** Overrides the sticky CSS class set by the `CdkTable`. */
|
|
43
|
+
protected stickyCssClass: string;
|
|
44
|
+
/** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */
|
|
45
|
+
protected needsPositionStickyOnElement: boolean;
|
|
46
|
+
get classList(): string;
|
|
47
|
+
/** Theme color for all table cells. */
|
|
48
|
+
color: ThemeColor | undefined;
|
|
49
|
+
/** Theme color for cell borders. */
|
|
50
|
+
borderColor: ThemeColor | undefined;
|
|
51
|
+
/** Adds zebra-striping to any table row within the `<tbody>`. */
|
|
52
|
+
stripedRows: boolean;
|
|
53
|
+
/** Adds zebra-striping to any table column */
|
|
54
|
+
stripedColumns: boolean;
|
|
55
|
+
/** Enables a hover state on table rows within a `<tbody>` */
|
|
56
|
+
hoveredRows: boolean;
|
|
57
|
+
/** Makes a `<table>` more compact */
|
|
58
|
+
get compact(): boolean;
|
|
59
|
+
set compact(value: boolean);
|
|
60
|
+
private _compact;
|
|
61
|
+
/** What table borders to display. */
|
|
62
|
+
displayBorders: TableBorders | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Adds a thicker border, darker between table groups — `<thead>`, `<tbody>`, and `<tfoot>`.
|
|
65
|
+
* @experimental
|
|
66
|
+
*/
|
|
67
|
+
divideGroups: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether to display `th` cells vertically.
|
|
70
|
+
* @experimental
|
|
71
|
+
*/
|
|
72
|
+
get verticalHeads(): boolean;
|
|
73
|
+
set verticalHeads(value: boolean);
|
|
74
|
+
private _verticalHeads;
|
|
75
|
+
protected updateStickyStyles(): void;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteTable<any>, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteTable<any>, "cute-table, table[cute-table]", ["cuteTable"], { "color": { "alias": "color"; "required": false; }; "borderColor": { "alias": "borderColor"; "required": false; }; "stripedRows": { "alias": "stripedRows"; "required": false; }; "stripedColumns": { "alias": "stripedColumns"; "required": false; }; "hoveredRows": { "alias": "hoveredRows"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "displayBorders": { "alias": "displayBorders"; "required": false; }; "divideGroups": { "alias": "divideGroups"; "required": false; }; "verticalHeads": { "alias": "verticalHeads"; "required": false; }; }, {}, never, ["caption", "colgroup, col", "*"], true, never>;
|
|
78
|
+
static ngAcceptInputType_stripedRows: unknown;
|
|
79
|
+
static ngAcceptInputType_stripedColumns: unknown;
|
|
80
|
+
static ngAcceptInputType_hoveredRows: unknown;
|
|
81
|
+
static ngAcceptInputType_compact: unknown;
|
|
82
|
+
static ngAcceptInputType_divideGroups: unknown;
|
|
83
|
+
static ngAcceptInputType_verticalHeads: unknown;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Cell definition for the `cute-table`.
|
|
88
|
+
* Captures the template of a column's data row cell as well as cell-specific properties.
|
|
89
|
+
*/
|
|
90
|
+
declare class CuteCellDef extends CdkCellDef {
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteCellDef, never>;
|
|
92
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteCellDef, "[cuteCellDef]", never, {}, {}, never, never, true, never>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Header cell definition for the `cute-table`.
|
|
96
|
+
* Captures the template of a column's header cell and as well as cell-specific properties.
|
|
97
|
+
*/
|
|
98
|
+
declare class CuteHeaderCellDef extends CdkHeaderCellDef {
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteHeaderCellDef, never>;
|
|
100
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteHeaderCellDef, "[cuteHeaderCellDef]", never, {}, {}, never, never, true, never>;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Footer cell definition for the `cute-table`.
|
|
104
|
+
* Captures the template of a column's footer cell and as well as cell-specific properties.
|
|
105
|
+
*/
|
|
106
|
+
declare class CuteFooterCellDef extends CdkFooterCellDef {
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteFooterCellDef, never>;
|
|
108
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteFooterCellDef, "[cuteFooterCellDef]", never, {}, {}, never, never, true, never>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Column definition for the `cute-table`.
|
|
112
|
+
* Defines a set of cells available for a table column.
|
|
113
|
+
*/
|
|
114
|
+
declare class CuteColumnDef extends CdkColumnDef {
|
|
115
|
+
/** Unique name for this column. */
|
|
116
|
+
get name(): string;
|
|
117
|
+
set name(name: string);
|
|
118
|
+
/**
|
|
119
|
+
* Add "cute-column-" prefix in addition to "cdk-column-" prefix.
|
|
120
|
+
* In the future, this will only add "cute-column-" and columnCssClassName
|
|
121
|
+
* will change from type string[] to string.
|
|
122
|
+
*/
|
|
123
|
+
protected _updateColumnCssClassName(): void;
|
|
124
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteColumnDef, never>;
|
|
125
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteColumnDef, "[cuteColumnDef]", never, { "sticky": { "alias": "sticky"; "required": false; }; "name": { "alias": "cuteColumnDef"; "required": false; }; }, {}, never, never, true, never>;
|
|
126
|
+
static ngAcceptInputType_sticky: unknown;
|
|
127
|
+
}
|
|
128
|
+
/** Header cell template container that adds the right classes and role. */
|
|
129
|
+
declare class CuteHeaderCell extends CdkHeaderCell {
|
|
130
|
+
color: ThemeColor | undefined;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteHeaderCell, never>;
|
|
132
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteHeaderCell, "cute-header-cell, th[cute-header-cell]", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
133
|
+
}
|
|
134
|
+
/** Footer cell template container that adds the right classes and role. */
|
|
135
|
+
declare class CuteFooterCell extends CdkFooterCell {
|
|
136
|
+
color: ThemeColor | undefined;
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteFooterCell, never>;
|
|
138
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteFooterCell, "cute-footer-cell, td[cute-footer-cell]", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
139
|
+
}
|
|
140
|
+
/** Cell template container that adds the right classes and role. */
|
|
141
|
+
declare class CuteCell extends CdkCell {
|
|
142
|
+
color: ThemeColor | undefined;
|
|
143
|
+
active: boolean;
|
|
144
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteCell, never>;
|
|
145
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteCell, "cute-cell, td[cute-cell]", never, { "color": { "alias": "color"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, {}, never, never, true, never>;
|
|
146
|
+
static ngAcceptInputType_active: unknown;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @license Apache-2.0
|
|
151
|
+
*
|
|
152
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
153
|
+
*
|
|
154
|
+
* You may not use this file except in compliance with the License
|
|
155
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
156
|
+
*
|
|
157
|
+
* This code is a modification of the `@angular/material` original
|
|
158
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Header row definition for the `cute-table`.
|
|
163
|
+
* Captures the header row's template and other header properties such as the columns to display.
|
|
164
|
+
*/
|
|
165
|
+
declare class CuteHeaderRowDef extends CdkHeaderRowDef {
|
|
166
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteHeaderRowDef, never>;
|
|
167
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteHeaderRowDef, "[cuteHeaderRowDef]", never, { "columns": { "alias": "cuteHeaderRowDef"; "required": false; }; "sticky": { "alias": "cuteHeaderRowDefSticky"; "required": false; }; }, {}, never, never, true, never>;
|
|
168
|
+
static ngAcceptInputType_sticky: unknown;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Footer row definition for the `cute-table`.
|
|
172
|
+
* Captures the footer row's template and other footer properties such as the columns to display.
|
|
173
|
+
*/
|
|
174
|
+
declare class CuteFooterRowDef extends CdkFooterRowDef {
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteFooterRowDef, never>;
|
|
176
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteFooterRowDef, "[cuteFooterRowDef]", never, { "columns": { "alias": "cuteFooterRowDef"; "required": false; }; "sticky": { "alias": "cuteFooterRowDefSticky"; "required": false; }; }, {}, never, never, true, never>;
|
|
177
|
+
static ngAcceptInputType_sticky: unknown;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Data row definition for the `cute-table`.
|
|
181
|
+
* Captures the data row's template and other properties such as the columns to display and
|
|
182
|
+
* a when predicate that describes when this row should be used.
|
|
183
|
+
*/
|
|
184
|
+
declare class CuteRowDef<T> extends CdkRowDef<T> {
|
|
185
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteRowDef<any>, never>;
|
|
186
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteRowDef<any>, "[cuteRowDef]", never, { "columns": { "alias": "cuteRowDefColumns"; "required": false; }; "when": { "alias": "cuteRowDefWhen"; "required": false; }; }, {}, never, never, true, never>;
|
|
187
|
+
}
|
|
188
|
+
/** Header template container that contains the cell outlet. Adds the right class and role. */
|
|
189
|
+
declare class CuteHeaderRow extends CdkHeaderRow {
|
|
190
|
+
color: ThemeColor | undefined;
|
|
191
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteHeaderRow, never>;
|
|
192
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteHeaderRow, "cute-header-row, tr[cute-header-row]", ["cuteHeaderRow"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
193
|
+
}
|
|
194
|
+
/** Footer template container that contains the cell outlet. Adds the right class and role. */
|
|
195
|
+
declare class CuteFooterRow extends CdkFooterRow {
|
|
196
|
+
color: ThemeColor | undefined;
|
|
197
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteFooterRow, never>;
|
|
198
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteFooterRow, "cute-footer-row, tr[cute-footer-row]", ["cuteFooterRow"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
199
|
+
}
|
|
200
|
+
/** Data row template container that contains the cell outlet. Adds the right class and role. */
|
|
201
|
+
declare class CuteRow extends CdkRow {
|
|
202
|
+
color: ThemeColor | undefined;
|
|
203
|
+
active: boolean;
|
|
204
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteRow, never>;
|
|
205
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteRow, "cute-row, tr[cute-row]", ["cuteRow"], { "color": { "alias": "color"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, {}, never, never, true, never>;
|
|
206
|
+
static ngAcceptInputType_active: unknown;
|
|
207
|
+
}
|
|
208
|
+
/** Row that can be used to display a message when no data is shown in the table. */
|
|
209
|
+
declare class CuteNoDataRow extends CdkNoDataRow {
|
|
210
|
+
_cellSelector: string;
|
|
211
|
+
constructor();
|
|
212
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteNoDataRow, never>;
|
|
213
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteNoDataRow, "ng-template[cuteNoDataRow]", never, {}, {}, never, never, true, never>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @license Apache-2.0
|
|
218
|
+
*
|
|
219
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
220
|
+
*
|
|
221
|
+
* You may not use this file except in compliance with the License
|
|
222
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
223
|
+
*
|
|
224
|
+
* This code is a modification of the `@angular/material` original
|
|
225
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Data source that accepts a client-side data array and includes native support of filtering,
|
|
230
|
+
* sorting (using CuteSort), and pagination (using CutePaginator).
|
|
231
|
+
*
|
|
232
|
+
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
|
|
233
|
+
* properties are accessed. It also allows for filter customization by overriding filterPredicate,
|
|
234
|
+
* which defines how row data is converted to a string for filter matching.
|
|
235
|
+
*
|
|
236
|
+
* **Note:** This class is meant to be a simple data source to help you get started. As such,
|
|
237
|
+
* it isn't equipped to handle some more advanced cases like robust i18n support or server-side
|
|
238
|
+
* interactions. If your app needs to support more advanced use cases, consider implementing your
|
|
239
|
+
* own `DataSource`.
|
|
240
|
+
*/
|
|
241
|
+
declare class CuteTableDataSource<T, P extends CutePaginator = CutePaginator> extends DataSource<T> {
|
|
242
|
+
/** Stream that emits when a new data array is set on the data source. */
|
|
243
|
+
private readonly _data;
|
|
244
|
+
/** Stream emitting render data to the table (depends on ordered data changes). */
|
|
245
|
+
private readonly _renderData;
|
|
246
|
+
/** Stream that emits when a new filter string is set on the data source. */
|
|
247
|
+
private readonly _filter;
|
|
248
|
+
/** Used to react to internal changes of the paginator that are made by the data source itself. */
|
|
249
|
+
private readonly _internalPageChanges;
|
|
250
|
+
/**
|
|
251
|
+
* Subscription to the changes that should trigger an update to the table's rendered rows, such
|
|
252
|
+
* as filtering, sorting, pagination, or base data changes.
|
|
253
|
+
*/
|
|
254
|
+
private _renderChangesSubscription;
|
|
255
|
+
/**
|
|
256
|
+
* The filtered set of data that has been matched by the filter string, or all the data if there
|
|
257
|
+
* is no filter. Useful for knowing the set of data the table represents.
|
|
258
|
+
* For example, a 'selectAll()' function would likely want to select the set of filtered data
|
|
259
|
+
* shown to the user rather than all the data.
|
|
260
|
+
*/
|
|
261
|
+
filteredData: T[];
|
|
262
|
+
/** Array of data that should be rendered by the table, where each object represents one row. */
|
|
263
|
+
get data(): T[];
|
|
264
|
+
set data(data: T[]);
|
|
265
|
+
/**
|
|
266
|
+
* Filter term that should be used to filter out objects from the data array. To override how
|
|
267
|
+
* data objects match to this filter string, provide a custom function for filterPredicate.
|
|
268
|
+
*/
|
|
269
|
+
get filter(): string;
|
|
270
|
+
set filter(filter: string);
|
|
271
|
+
/**
|
|
272
|
+
* Instance of the CuteSort directive used by the table to control its sorting. Sort changes
|
|
273
|
+
* emitted by the CuteSort will trigger an update to the table's rendered data.
|
|
274
|
+
*/
|
|
275
|
+
get sort(): CuteSort | null;
|
|
276
|
+
set sort(sort: CuteSort | null);
|
|
277
|
+
private _sort;
|
|
278
|
+
/**
|
|
279
|
+
* Instance of the paginator component used by the table to control what page of the data is
|
|
280
|
+
* displayed. Page changes emitted by the paginator will trigger an update to the
|
|
281
|
+
* table's rendered data.
|
|
282
|
+
*
|
|
283
|
+
* Note that the data source uses the paginator's properties to calculate which page of data
|
|
284
|
+
* should be displayed. If the paginator receives its properties as template inputs,
|
|
285
|
+
* e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been
|
|
286
|
+
* initialized before assigning it to this data source.
|
|
287
|
+
*/
|
|
288
|
+
get paginator(): P | null;
|
|
289
|
+
set paginator(paginator: P | null);
|
|
290
|
+
private _paginator;
|
|
291
|
+
/**
|
|
292
|
+
* Data accessor function that is used for accessing data properties for sorting through
|
|
293
|
+
* the default sortData function.
|
|
294
|
+
* This default function assumes that the sort header IDs (which defaults to the column name)
|
|
295
|
+
* matches the data's properties (e.g., column Xyz represents data['Xyz']).
|
|
296
|
+
* May be set to a custom function for different behavior.
|
|
297
|
+
* @param data Data object that is being accessed.
|
|
298
|
+
* @param sortHeaderId The name of the column that represents the data.
|
|
299
|
+
*/
|
|
300
|
+
sortingDataAccessor: (data: T, sortHeaderId: string) => string | number;
|
|
301
|
+
/**
|
|
302
|
+
* Gets a sorted copy of the data array based on the state of the CuteSort. Called
|
|
303
|
+
* after changes are made to the filtered data or when sort changes are emitted from CuteSort.
|
|
304
|
+
* By default, the function retrieves the active sort and its direction and compares data
|
|
305
|
+
* by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation
|
|
306
|
+
* of data ordering.
|
|
307
|
+
* @param data The array of data that should be sorted.
|
|
308
|
+
* @param sort The connected CuteSort that holds the current sort state.
|
|
309
|
+
*/
|
|
310
|
+
sortData: (data: T[], sort: CuteSort) => T[];
|
|
311
|
+
/**
|
|
312
|
+
* Checks if a data object matches the data source's filter string. By default, each data object
|
|
313
|
+
* is converted to a string of its properties and returns true if the filter has
|
|
314
|
+
* at least one occurrence in that string. By default, the filter string has its whitespace
|
|
315
|
+
* trimmed and the match is case-insensitive. May be overridden for a custom implementation of
|
|
316
|
+
* filter matching.
|
|
317
|
+
* @param data Data object used to check against the filter.
|
|
318
|
+
* @param filter Filter string that has been set on the data source.
|
|
319
|
+
* @returns Whether the filter matches against the data
|
|
320
|
+
*/
|
|
321
|
+
filterPredicate: (data: T, filter: string) => boolean;
|
|
322
|
+
constructor(initialData?: T[]);
|
|
323
|
+
/**
|
|
324
|
+
* Subscribe to changes that should trigger an update to the table's rendered rows. When the
|
|
325
|
+
* changes occur, process the current state of the filter, sort, and pagination along with
|
|
326
|
+
* the provided base data and send it to the table for rendering.
|
|
327
|
+
*/
|
|
328
|
+
protected _updateChangeSubscription(): void;
|
|
329
|
+
/**
|
|
330
|
+
* Returns a filtered data array where each filter object contains the filter string within
|
|
331
|
+
* the result of the filterPredicate function. If no filter is set, return the data array
|
|
332
|
+
* as provided.
|
|
333
|
+
*/
|
|
334
|
+
protected _filterData(data: T[]): T[];
|
|
335
|
+
/**
|
|
336
|
+
* Returns a sorted copy of the data if CuteSort has a sort applied, otherwise just returns the
|
|
337
|
+
* data array as provided. Uses the default data accessor for data lookup, unless a
|
|
338
|
+
* sortDataAccessor function is defined.
|
|
339
|
+
*/
|
|
340
|
+
protected _orderData(data: T[]): T[];
|
|
341
|
+
/**
|
|
342
|
+
* Returns a paged slice of the provided data array according to the provided paginator's page
|
|
343
|
+
* index and length. If there is no paginator provided, return the data array as provided.
|
|
344
|
+
*/
|
|
345
|
+
protected _pageData(data: T[]): T[];
|
|
346
|
+
/**
|
|
347
|
+
* Updates the paginator to reflect the length of the filtered data, and makes sure that the page
|
|
348
|
+
* index does not exceed the paginator's last page. Values are changed in a resolved promise to
|
|
349
|
+
* guard against making property changes within a round of change detection.
|
|
350
|
+
*/
|
|
351
|
+
protected _updatePaginator(filteredDataLength: number): void;
|
|
352
|
+
/**
|
|
353
|
+
* Used by the CuteTable. Called when it connects to the data source.
|
|
354
|
+
*/
|
|
355
|
+
connect(): BehaviorSubject<T[]>;
|
|
356
|
+
/**
|
|
357
|
+
* Used by the CuteTable. Called when it disconnects from the data source.
|
|
358
|
+
*/
|
|
359
|
+
disconnect(): void;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @license Apache-2.0
|
|
364
|
+
*
|
|
365
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
366
|
+
*
|
|
367
|
+
* You may not use this file except in compliance with the License
|
|
368
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
369
|
+
*
|
|
370
|
+
* This code is a modification of the `@angular/material` original
|
|
371
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Column that simply shows text content for the header and row cells. Assumes that the table
|
|
376
|
+
* is using the native table implementation (`<table>`).
|
|
377
|
+
*
|
|
378
|
+
* By default, the name of this column will be the header text and data property accessor.
|
|
379
|
+
* The header text can be overridden with the `headerText` input. Cell values can be overridden with
|
|
380
|
+
* the `dataAccessor` input. Change the text justification to the start or end using the `justify`
|
|
381
|
+
* input.
|
|
382
|
+
*/
|
|
383
|
+
declare class CuteTextColumn<T> extends CdkTextColumn<T> {
|
|
384
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteTextColumn<any>, never>;
|
|
385
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteTextColumn<any>, "cute-text-column", never, {}, {}, never, never, true, never>;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
declare class CuteTableModule {
|
|
389
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteTableModule, never>;
|
|
390
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CuteTableModule, never, [typeof i1.CommonModule, typeof i2.CdkTableModule, typeof CuteTable, typeof CuteRecycleRows, typeof CuteHeaderCellDef, typeof CuteHeaderRowDef, typeof CuteColumnDef, typeof CuteCellDef, typeof CuteRowDef, typeof CuteFooterCellDef, typeof CuteFooterRowDef, typeof CuteHeaderCell, typeof CuteCell, typeof CuteFooterCell, typeof CuteHeaderRow, typeof CuteRow, typeof CuteFooterRow, typeof CuteNoDataRow, typeof CuteTextColumn], [typeof CuteTable, typeof CuteRecycleRows, typeof CuteHeaderCellDef, typeof CuteHeaderRowDef, typeof CuteColumnDef, typeof CuteCellDef, typeof CuteRowDef, typeof CuteFooterCellDef, typeof CuteFooterRowDef, typeof CuteHeaderCell, typeof CuteCell, typeof CuteFooterCell, typeof CuteHeaderRow, typeof CuteRow, typeof CuteFooterRow, typeof CuteNoDataRow, typeof CuteTextColumn]>;
|
|
391
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CuteTableModule>;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export { CUTE_TABLE, CuteCell, CuteCellDef, CuteColumnDef, CuteFooterCell, CuteFooterCellDef, CuteFooterRow, CuteFooterRowDef, CuteHeaderCell, CuteHeaderCellDef, CuteHeaderRow, CuteHeaderRowDef, CuteNoDataRow, CuteRecycleRows, CuteRow, CuteRowDef, CuteTable, CuteTableDataSource, CuteTableModule, CuteTextColumn };
|
|
395
|
+
export type { TableBorders };
|