@cute-widgets/base 20.0.2 → 20.0.4
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 +35 -1
- package/abstract/index.d.ts +5 -2
- package/button/index.d.ts +7 -6
- package/card/index.d.ts +9 -6
- package/core/directives/index.d.ts +2 -32
- package/core/index.d.ts +35 -28
- package/core/interfaces/index.d.ts +1 -1
- package/core/layout/index.d.ts +34 -27
- package/core/nav/index.d.ts +1 -2
- package/expansion/index.d.ts +5 -18
- package/fesm2022/cute-widgets-base-abstract.mjs +20 -5
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button-toggle.mjs +2 -2
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button.mjs +12 -11
- package/fesm2022/cute-widgets-base-button.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-card.mjs +46 -29
- package/fesm2022/cute-widgets-base-card.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-chips.mjs +6 -6
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs +5 -73
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-layout.mjs +64 -40
- package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-nav.mjs +1 -2
- package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core.mjs +64 -40
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-dialog.mjs +1 -1
- package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-expansion.mjs +19 -13
- package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-list.mjs +2 -2
- package/fesm2022/cute-widgets-base-list.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-navbar.mjs +6 -0
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-paginator.mjs +12 -10
- package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-radio.mjs +1 -2
- package/fesm2022/cute-widgets-base-radio.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-select.mjs +2 -2
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sidenav.mjs +31 -30
- package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-snack-bar.mjs +2 -2
- package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sort.mjs +63 -260
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-table.mjs +22 -16
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tree.mjs +11 -2
- package/fesm2022/cute-widgets-base-tree.mjs.map +1 -1
- package/fesm2022/cute-widgets-base.mjs +3 -1
- package/fesm2022/cute-widgets-base.mjs.map +1 -1
- package/navbar/index.d.ts +6 -0
- package/package.json +18 -17
- package/paginator/index.d.ts +5 -16
- package/radio/index.d.ts +0 -1
- package/sidenav/index.d.ts +1 -2
- package/sort/index.d.ts +25 -138
- package/table/index.d.ts +24 -21
- package/tree/index.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cute-widgets/base",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/cute-widgets/base/issues"
|
|
11
11
|
},
|
|
12
|
+
"homepage": "https://cutewidgets.com",
|
|
12
13
|
"description": "Angular Material components styled with Bootstrap",
|
|
13
14
|
"author": "ALEXANDER STRELKOV <alv.strelkov@gmail.com>",
|
|
14
15
|
"keywords": [
|
|
@@ -62,14 +63,14 @@
|
|
|
62
63
|
"types": "./bottom-sheet/index.d.ts",
|
|
63
64
|
"default": "./fesm2022/cute-widgets-base-bottom-sheet.mjs"
|
|
64
65
|
},
|
|
65
|
-
"./button-toggle": {
|
|
66
|
-
"types": "./button-toggle/index.d.ts",
|
|
67
|
-
"default": "./fesm2022/cute-widgets-base-button-toggle.mjs"
|
|
68
|
-
},
|
|
69
66
|
"./button": {
|
|
70
67
|
"types": "./button/index.d.ts",
|
|
71
68
|
"default": "./fesm2022/cute-widgets-base-button.mjs"
|
|
72
69
|
},
|
|
70
|
+
"./button-toggle": {
|
|
71
|
+
"types": "./button-toggle/index.d.ts",
|
|
72
|
+
"default": "./fesm2022/cute-widgets-base-button-toggle.mjs"
|
|
73
|
+
},
|
|
73
74
|
"./card": {
|
|
74
75
|
"types": "./card/index.d.ts",
|
|
75
76
|
"default": "./fesm2022/cute-widgets-base-card.mjs"
|
|
@@ -178,14 +179,14 @@
|
|
|
178
179
|
"types": "./stepper/index.d.ts",
|
|
179
180
|
"default": "./fesm2022/cute-widgets-base-stepper.mjs"
|
|
180
181
|
},
|
|
181
|
-
"./table": {
|
|
182
|
-
"types": "./table/index.d.ts",
|
|
183
|
-
"default": "./fesm2022/cute-widgets-base-table.mjs"
|
|
184
|
-
},
|
|
185
182
|
"./tabs": {
|
|
186
183
|
"types": "./tabs/index.d.ts",
|
|
187
184
|
"default": "./fesm2022/cute-widgets-base-tabs.mjs"
|
|
188
185
|
},
|
|
186
|
+
"./table": {
|
|
187
|
+
"types": "./table/index.d.ts",
|
|
188
|
+
"default": "./fesm2022/cute-widgets-base-table.mjs"
|
|
189
|
+
},
|
|
189
190
|
"./timepicker": {
|
|
190
191
|
"types": "./timepicker/index.d.ts",
|
|
191
192
|
"default": "./fesm2022/cute-widgets-base-timepicker.mjs"
|
|
@@ -226,14 +227,14 @@
|
|
|
226
227
|
"types": "./core/layout/index.d.ts",
|
|
227
228
|
"default": "./fesm2022/cute-widgets-base-core-layout.mjs"
|
|
228
229
|
},
|
|
229
|
-
"./core/line": {
|
|
230
|
-
"types": "./core/line/index.d.ts",
|
|
231
|
-
"default": "./fesm2022/cute-widgets-base-core-line.mjs"
|
|
232
|
-
},
|
|
233
230
|
"./core/nav": {
|
|
234
231
|
"types": "./core/nav/index.d.ts",
|
|
235
232
|
"default": "./fesm2022/cute-widgets-base-core-nav.mjs"
|
|
236
233
|
},
|
|
234
|
+
"./core/line": {
|
|
235
|
+
"types": "./core/line/index.d.ts",
|
|
236
|
+
"default": "./fesm2022/cute-widgets-base-core-line.mjs"
|
|
237
|
+
},
|
|
237
238
|
"./core/observers": {
|
|
238
239
|
"types": "./core/observers/index.d.ts",
|
|
239
240
|
"default": "./fesm2022/cute-widgets-base-core-observers.mjs"
|
|
@@ -250,14 +251,14 @@
|
|
|
250
251
|
"types": "./core/ripple/index.d.ts",
|
|
251
252
|
"default": "./fesm2022/cute-widgets-base-core-ripple.mjs"
|
|
252
253
|
},
|
|
253
|
-
"./core/testing": {
|
|
254
|
-
"types": "./core/testing/index.d.ts",
|
|
255
|
-
"default": "./fesm2022/cute-widgets-base-core-testing.mjs"
|
|
256
|
-
},
|
|
257
254
|
"./core/theming": {
|
|
258
255
|
"types": "./core/theming/index.d.ts",
|
|
259
256
|
"default": "./fesm2022/cute-widgets-base-core-theming.mjs"
|
|
260
257
|
},
|
|
258
|
+
"./core/testing": {
|
|
259
|
+
"types": "./core/testing/index.d.ts",
|
|
260
|
+
"default": "./fesm2022/cute-widgets-base-core-testing.mjs"
|
|
261
|
+
},
|
|
261
262
|
"./core/types": {
|
|
262
263
|
"types": "./core/types/index.d.ts",
|
|
263
264
|
"default": "./fesm2022/cute-widgets-base-core-types.mjs"
|
package/paginator/index.d.ts
CHANGED
|
@@ -39,18 +39,6 @@ declare class CutePaginatorIntl {
|
|
|
39
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<CutePaginatorIntl>;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* @license Apache-2.0
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
46
|
-
*
|
|
47
|
-
* You may not use this file except in compliance with the License
|
|
48
|
-
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
-
*
|
|
50
|
-
* This code is a modification of the `@angular/material` original
|
|
51
|
-
* code licensed under MIT-style License (https://angular.dev/license).
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
42
|
/** Object that can used to configure the underlying `CuteSelect` inside a `CutePaginator`. */
|
|
55
43
|
interface CutePaginatorSelectConfig {
|
|
56
44
|
/** Whether to center the active option over the trigger. */
|
|
@@ -102,7 +90,7 @@ declare class CutePaginator extends CuteFocusableControl implements AfterViewChe
|
|
|
102
90
|
/** If set, styles the "page size" form field with the designated style. */
|
|
103
91
|
/** ID for the DOM node containing the pagination's items per-page label. */
|
|
104
92
|
protected readonly _pageSizeLabelId: string;
|
|
105
|
-
protected hideActive: boolean
|
|
93
|
+
protected hideActive: i0.WritableSignal<boolean>;
|
|
106
94
|
/** The zero-based page index of the displayed list of items. Defaulted to 0. */
|
|
107
95
|
get pageIndex(): number;
|
|
108
96
|
set pageIndex(value: number);
|
|
@@ -129,9 +117,9 @@ declare class CutePaginator extends CuteFocusableControl implements AfterViewChe
|
|
|
129
117
|
hideBorders: boolean;
|
|
130
118
|
/** Style of the pagination's middle section. Note that previous/next buttons are always shown. */
|
|
131
119
|
middleSectionStyle: 'pages' | '5-pages' | 'range' | 'none';
|
|
132
|
-
/** Changes the alignment of the pagination sections in the parent container */
|
|
133
|
-
alignment: 'start' | 'end' | 'center' | 'between';
|
|
134
|
-
/** Changes the pagination's size to smaller or larger */
|
|
120
|
+
/** Changes the alignment of the pagination sections in the parent container. */
|
|
121
|
+
alignment: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | undefined;
|
|
122
|
+
/** Changes the pagination's size to smaller or larger. */
|
|
135
123
|
magnitude: RelativeSize | undefined;
|
|
136
124
|
/** Used to configure the underlying `CuteSelect` inside the paginator. */
|
|
137
125
|
selectConfig: CutePaginatorSelectConfig;
|
|
@@ -146,6 +134,7 @@ declare class CutePaginator extends CuteFocusableControl implements AfterViewChe
|
|
|
146
134
|
ngAfterViewChecked(): void;
|
|
147
135
|
ngOnDestroy(): void;
|
|
148
136
|
protected onMouseDown(event: MouseEvent): void;
|
|
137
|
+
protected onMouseUp(event: MouseEvent): void;
|
|
149
138
|
/** Whether the specified index is the `active` page of the paginator */
|
|
150
139
|
protected isActivePage(index: number): boolean;
|
|
151
140
|
private _updateFirstLastVisibleIndexes;
|
package/radio/index.d.ts
CHANGED
|
@@ -39,7 +39,6 @@ declare const CUTE_RADIO_DEFAULT_OPTIONS: InjectionToken<CuteRadioDefaultOptions
|
|
|
39
39
|
declare class CuteRadioButton extends CuteInputControl implements DoCheck {
|
|
40
40
|
private _ngZone;
|
|
41
41
|
private _injector;
|
|
42
|
-
private _destroyRef;
|
|
43
42
|
private readonly _radioDispatcher;
|
|
44
43
|
private _defaultOptions;
|
|
45
44
|
private _cleanupClick;
|
package/sidenav/index.d.ts
CHANGED
|
@@ -37,13 +37,12 @@ declare const CUTE_DRAWER_DEFAULT_AUTOSIZE: InjectionToken<boolean>;
|
|
|
37
37
|
*/
|
|
38
38
|
declare const CUTE_DRAWER_CONTAINER: InjectionToken<unknown>;
|
|
39
39
|
/**
|
|
40
|
-
* The main content of the 'cute-drawer' component
|
|
40
|
+
* The main content of the 'cute-drawer' component.
|
|
41
41
|
*/
|
|
42
42
|
declare class CuteDrawerContent extends CdkScrollable implements AfterContentInit {
|
|
43
43
|
private _platform;
|
|
44
44
|
private _changeDetectorRef;
|
|
45
45
|
_container: CuteDrawerContainer;
|
|
46
|
-
protected generateId(): string;
|
|
47
46
|
constructor(...args: unknown[]);
|
|
48
47
|
ngAfterContentInit(): void;
|
|
49
48
|
/** Determines whether the content element should be hidden from the user. */
|
package/sort/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { FocusMonitor, AriaDescriber } from '@angular/cdk/a11y';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { OnChanges, OnDestroy, OnInit, EventEmitter, SimpleChanges, InjectionToken, Optional, AfterViewInit
|
|
2
|
+
import { OnChanges, OnDestroy, OnInit, EventEmitter, SimpleChanges, InjectionToken, Optional, AfterViewInit } from '@angular/core';
|
|
4
3
|
import { Subject, Observable } from 'rxjs';
|
|
5
|
-
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
6
4
|
import * as i1 from '@angular/common';
|
|
7
5
|
|
|
8
6
|
type SortDirection = 'asc' | 'desc' | '';
|
|
@@ -21,7 +19,7 @@ type SortDirection = 'asc' | 'desc' | '';
|
|
|
21
19
|
|
|
22
20
|
/** Position of the arrow that displays when sorted. */
|
|
23
21
|
type SortHeaderArrowPosition = 'before' | 'after';
|
|
24
|
-
/** Interface for a directive that holds sorting state consumed by `
|
|
22
|
+
/** Interface for a directive that holds sorting state consumed by `CuteSortHeader`. */
|
|
25
23
|
interface CuteSortable {
|
|
26
24
|
/** The id of the column being sorted. */
|
|
27
25
|
id: string;
|
|
@@ -44,10 +42,10 @@ interface CuteSortDefaultOptions {
|
|
|
44
42
|
/** Position of the arrow that displays when sorted. */
|
|
45
43
|
arrowPosition?: SortHeaderArrowPosition;
|
|
46
44
|
}
|
|
47
|
-
/** Injection token to be used to override the default options for `
|
|
45
|
+
/** Injection token to be used to override the default options for `cute-sort`. */
|
|
48
46
|
declare const CUTE_SORT_DEFAULT_OPTIONS: InjectionToken<CuteSortDefaultOptions>;
|
|
49
|
-
/** Container for
|
|
50
|
-
declare class CuteSort implements OnChanges, OnDestroy, OnInit {
|
|
47
|
+
/** Container for `CuteSortable`s to manage the sort state and provide default sort parameters. */
|
|
48
|
+
declare class CuteSort implements OnChanges, OnDestroy, OnInit, Sort {
|
|
51
49
|
private _defaultOptions?;
|
|
52
50
|
private _initializedStream;
|
|
53
51
|
/** Collection of all registered sortables that this directive manages. */
|
|
@@ -55,7 +53,7 @@ declare class CuteSort implements OnChanges, OnDestroy, OnInit {
|
|
|
55
53
|
/** Used to notify any child components listening to state changes. */
|
|
56
54
|
readonly _stateChanges: Subject<void>;
|
|
57
55
|
/** The id of the most recently sorted CuteSortable. */
|
|
58
|
-
active: string
|
|
56
|
+
active: string;
|
|
59
57
|
/**
|
|
60
58
|
* The direction to set when a CuteSortable is initially sorted.
|
|
61
59
|
* May be overridden by the CuteSortable's sort start.
|
|
@@ -134,40 +132,6 @@ declare const CUTE_SORT_HEADER_INTL_PROVIDER: {
|
|
|
134
132
|
useFactory: typeof CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY;
|
|
135
133
|
};
|
|
136
134
|
|
|
137
|
-
/**
|
|
138
|
-
* @license Apache-2.0
|
|
139
|
-
*
|
|
140
|
-
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
141
|
-
*
|
|
142
|
-
* You may not use this file except in compliance with the License
|
|
143
|
-
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
144
|
-
*
|
|
145
|
-
* This code is a modification of the `@angular/material` original
|
|
146
|
-
* code licensed under MIT-style License (https://angular.dev/license).
|
|
147
|
-
*/
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Valid positions for the arrow to be in for its opacity and translation. If the state is a
|
|
151
|
-
* sort direction, the position of the arrow will be above/below and opacity 0. If the state is
|
|
152
|
-
* _hint_, the arrow will be in the center with a slight opacity. _Active_ state means the arrow will
|
|
153
|
-
* be fully opaque in the center.
|
|
154
|
-
*
|
|
155
|
-
* @docs-private
|
|
156
|
-
* @deprecated No longer being used, to be removed.
|
|
157
|
-
* @breaking-change 21.0.0
|
|
158
|
-
*/
|
|
159
|
-
type ArrowViewState = SortDirection | 'hint' | 'active';
|
|
160
|
-
/**
|
|
161
|
-
* States describing the arrow's animated position (animating _fromState_ to _toState_).
|
|
162
|
-
* If the _fromState_ is not defined, there will be no animated transition to the _toState_.
|
|
163
|
-
* @docs-private
|
|
164
|
-
* @deprecated No longer being used, to be removed.
|
|
165
|
-
* @breaking-change 21.0.0
|
|
166
|
-
*/
|
|
167
|
-
interface ArrowViewStateTransition {
|
|
168
|
-
fromState?: ArrowViewState;
|
|
169
|
-
toState?: ArrowViewState;
|
|
170
|
-
}
|
|
171
135
|
/** Column definition associated with a `CuteSortHeader`. */
|
|
172
136
|
interface CuteSortHeaderColumnDef {
|
|
173
137
|
name: string;
|
|
@@ -176,47 +140,31 @@ interface CuteSortHeaderColumnDef {
|
|
|
176
140
|
* Applies sorting behavior (click to change sort) and styles to an element, including an
|
|
177
141
|
* arrow to display the current sort direction.
|
|
178
142
|
*
|
|
179
|
-
* Must be provided with an id and contained within a parent
|
|
143
|
+
* Must be provided with an id and contained within a parent CuteSort directive.
|
|
180
144
|
*
|
|
181
145
|
* If used on header cells in a CdkTable, it will automatically default its id from its containing
|
|
182
146
|
* column definition.
|
|
183
147
|
*/
|
|
184
148
|
declare class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterViewInit {
|
|
185
|
-
/**
|
|
186
|
-
* @deprecated `_intl` parameter isn't being used anymore, and it'll be removed.
|
|
187
|
-
* @breaking-change 13.0.0
|
|
188
|
-
*/
|
|
189
149
|
_intl: CuteSortHeaderIntl;
|
|
190
|
-
private _changeDetectorRef;
|
|
191
150
|
_sort: CuteSort;
|
|
192
|
-
_columnDef: CuteSortHeaderColumnDef;
|
|
151
|
+
_columnDef: CuteSortHeaderColumnDef | null;
|
|
152
|
+
private _changeDetectorRef;
|
|
193
153
|
private _focusMonitor;
|
|
194
154
|
private _elementRef;
|
|
195
|
-
|
|
196
|
-
private
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* The element with role="button" inside this component's view. We need this to apply
|
|
200
|
-
* a description with AriaDescriber.
|
|
201
|
-
*/
|
|
202
|
-
private _sortButton;
|
|
155
|
+
private _ariaDescriber;
|
|
156
|
+
private _renderChanges;
|
|
157
|
+
protected _animationsDisabled: boolean;
|
|
203
158
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
159
|
+
* Indicates which state was just cleared from the sort header.
|
|
160
|
+
* Will be reset on the next interaction. Used for coordinating animations.
|
|
206
161
|
*/
|
|
207
|
-
|
|
162
|
+
protected _recentlyCleared: i0.WritableSignal<SortDirection | null>;
|
|
208
163
|
/**
|
|
209
|
-
* The
|
|
210
|
-
*
|
|
211
|
-
* so that there is no animation displayed.
|
|
164
|
+
* The element with role="button" inside this component's view. We need this
|
|
165
|
+
* in order to apply a description with AriaDescriber.
|
|
212
166
|
*/
|
|
213
|
-
|
|
214
|
-
/** The direction the arrow should be facing, according to the current state. */
|
|
215
|
-
_arrowDirection: SortDirection;
|
|
216
|
-
/**
|
|
217
|
-
* Whether the view state animation should show the transition between the `from` and `to` states.
|
|
218
|
-
*/
|
|
219
|
-
_disableViewStateAnimation: boolean;
|
|
167
|
+
private _sortButton;
|
|
220
168
|
/**
|
|
221
169
|
* ID of this sort header. If used within the context of a CdkColumnDef, this will default to
|
|
222
170
|
* the column's name.
|
|
@@ -229,7 +177,7 @@ declare class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterVi
|
|
|
229
177
|
/** whether the sort header is disabled. */
|
|
230
178
|
disabled: boolean;
|
|
231
179
|
/**
|
|
232
|
-
* Description applied to
|
|
180
|
+
* Description applied to CuteSortHeader's button element with aria-describedby. This text should
|
|
233
181
|
* describe the action that will occur when the user clicks the sort header.
|
|
234
182
|
*/
|
|
235
183
|
get sortActionDescription(): string;
|
|
@@ -237,49 +185,15 @@ declare class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterVi
|
|
|
237
185
|
private _sortActionDescription;
|
|
238
186
|
/** Overrides the disable clear value of the containing CuteSort for this CuteSortable. */
|
|
239
187
|
disableClear: boolean;
|
|
240
|
-
constructor(
|
|
241
|
-
/**
|
|
242
|
-
* @deprecated `_intl` parameter isn't being used anymore, and it'll be removed.
|
|
243
|
-
* @breaking-change 13.0.0
|
|
244
|
-
*/
|
|
245
|
-
_intl: CuteSortHeaderIntl, _changeDetectorRef: ChangeDetectorRef, _sort: CuteSort, _columnDef: CuteSortHeaderColumnDef, _focusMonitor: FocusMonitor, _elementRef: ElementRef<HTMLElement>,
|
|
246
|
-
/** @breaking-change 14.0.0 _ariaDescriber will be required. */
|
|
247
|
-
_ariaDescriber?: (AriaDescriber | null) | undefined, defaultOptions?: CuteSortDefaultOptions);
|
|
188
|
+
constructor(...args: unknown[]);
|
|
248
189
|
ngOnInit(): void;
|
|
249
190
|
ngAfterViewInit(): void;
|
|
250
191
|
ngOnDestroy(): void;
|
|
251
|
-
/**
|
|
252
|
-
* Sets the "hint" state such that the arrow will be semi-transparently displayed as a hint to the
|
|
253
|
-
* user showing what the active sort will become. If set to false, the arrow will fade away.
|
|
254
|
-
*/
|
|
255
|
-
_setIndicatorHintVisible(visible: boolean): void;
|
|
256
|
-
/**
|
|
257
|
-
* Sets the animation transition view state for the arrow's position and opacity. If the
|
|
258
|
-
* `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that
|
|
259
|
-
* no animation appears.
|
|
260
|
-
*/
|
|
261
|
-
_setAnimationTransitionState(viewState: ArrowViewStateTransition): void;
|
|
262
192
|
/** Triggers the sort on this sort header and removes the indicator hint. */
|
|
263
193
|
_toggleOnInteraction(): void;
|
|
264
|
-
_handleClick(): void;
|
|
265
194
|
_handleKeydown(event: KeyboardEvent): void;
|
|
266
|
-
/** Whether this
|
|
195
|
+
/** Whether this CuteSortHeader is currently sorted in either ascending or descending order. */
|
|
267
196
|
_isSorted(): boolean;
|
|
268
|
-
/** Returns the animation state for the arrow direction (indicator and pointers). */
|
|
269
|
-
_getArrowDirectionState(): string;
|
|
270
|
-
/** Returns the arrow position state (opacity, translation). */
|
|
271
|
-
_getArrowViewState(): string;
|
|
272
|
-
/**
|
|
273
|
-
* Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be
|
|
274
|
-
* facing the start direction. Otherwise, if it is sorted, the arrow should point in the currently
|
|
275
|
-
* active sorted direction. The reason this is updated through a function is because the direction
|
|
276
|
-
* should only be changed at specific times - when deactivated but the hint is displayed and when
|
|
277
|
-
* the sort is active and the direction changes. Otherwise, the arrow's direction should linger
|
|
278
|
-
* in cases such as the sort becoming deactivated but we want to animate the arrow away while
|
|
279
|
-
* preserving its direction, even though the next sort direction is actually different and should
|
|
280
|
-
* only be changed once the arrow displays again (hint or activation).
|
|
281
|
-
*/
|
|
282
|
-
_updateArrowDirection(): void;
|
|
283
197
|
_isDisabled(): boolean;
|
|
284
198
|
/**
|
|
285
199
|
* Gets the aria-sort attribute that should be applied to this sort header. If this header
|
|
@@ -291,44 +205,17 @@ declare class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterVi
|
|
|
291
205
|
/** Whether the arrow inside the sort header should be rendered. */
|
|
292
206
|
_renderArrow(): boolean;
|
|
293
207
|
private _updateSortActionDescription;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSortHeader, [null, null, { optional: true; }, { optional: true; }, null, null, { optional: true; }, { optional: true; }]>;
|
|
297
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuteSortHeader, "[cute-sort-header]", ["cuteSortHeader"], { "id": { "alias": "cute-sort-header"; "required": false; }; "arrowPosition": { "alias": "arrowPosition"; "required": false; }; "start": { "alias": "start"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sortActionDescription": { "alias": "sortActionDescription"; "required": false; }; "disableClear": { "alias": "disableClear"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
208
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSortHeader, never>;
|
|
209
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteSortHeader, "[cute-sort-header]", ["cuteSortHeader"], { "id": { "alias": "cute-sort-header"; "required": false; }; "arrowPosition": { "alias": "arrowPosition"; "required": false; }; "start": { "alias": "start"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sortActionDescription": { "alias": "sortActionDescription"; "required": false; }; "disableClear": { "alias": "disableClear"; "required": false; }; }, {}, never, ["*", "[cuteSortHeaderIcon]"], true, never>;
|
|
298
210
|
static ngAcceptInputType_disabled: unknown;
|
|
299
211
|
static ngAcceptInputType_disableClear: unknown;
|
|
300
212
|
}
|
|
301
213
|
|
|
302
|
-
/**
|
|
303
|
-
* @license Apache-2.0
|
|
304
|
-
*
|
|
305
|
-
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
306
|
-
*
|
|
307
|
-
* You may not use this file except in compliance with the License
|
|
308
|
-
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
309
|
-
*
|
|
310
|
-
* This code is a modification of the `@angular/material` original
|
|
311
|
-
* code licensed under MIT-style License (https://angular.dev/license).
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Animations used by CuteSort.
|
|
316
|
-
* @docs-private
|
|
317
|
-
*/
|
|
318
|
-
declare const cuteSortAnimations: {
|
|
319
|
-
readonly indicator: AnimationTriggerMetadata;
|
|
320
|
-
readonly leftPointer: AnimationTriggerMetadata;
|
|
321
|
-
readonly rightPointer: AnimationTriggerMetadata;
|
|
322
|
-
readonly arrowOpacity: AnimationTriggerMetadata;
|
|
323
|
-
readonly arrowPosition: AnimationTriggerMetadata;
|
|
324
|
-
readonly allowChildren: AnimationTriggerMetadata;
|
|
325
|
-
};
|
|
326
|
-
|
|
327
214
|
declare class CuteSortModule {
|
|
328
215
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSortModule, never>;
|
|
329
216
|
static ɵmod: i0.ɵɵNgModuleDeclaration<CuteSortModule, never, [typeof i1.CommonModule, typeof CuteSort, typeof CuteSortHeader], [typeof CuteSort, typeof CuteSortHeader]>;
|
|
330
217
|
static ɵinj: i0.ɵɵInjectorDeclaration<CuteSortModule>;
|
|
331
218
|
}
|
|
332
219
|
|
|
333
|
-
export { CUTE_SORT_DEFAULT_OPTIONS, CUTE_SORT_HEADER_INTL_PROVIDER, CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY, CuteSort, CuteSortHeader, CuteSortHeaderIntl, CuteSortModule
|
|
334
|
-
export type {
|
|
220
|
+
export { CUTE_SORT_DEFAULT_OPTIONS, CUTE_SORT_HEADER_INTL_PROVIDER, CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY, CuteSort, CuteSortHeader, CuteSortHeaderIntl, CuteSortModule };
|
|
221
|
+
export type { CuteSortDefaultOptions, CuteSortable, Sort, SortDirection, SortHeaderArrowPosition };
|
package/table/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { CdkTable, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef,
|
|
|
5
5
|
import { ThemeColor } from '@cute-widgets/base/core';
|
|
6
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { DataSource } from '@angular/cdk/collections';
|
|
8
|
-
import { CuteSort } from '@cute-widgets/base/sort';
|
|
8
|
+
import { CuteSort, Sort } from '@cute-widgets/base/sort';
|
|
9
9
|
import { CutePaginator } from '@cute-widgets/base/paginator';
|
|
10
10
|
import * as i1 from '@angular/common';
|
|
11
11
|
|
|
@@ -25,8 +25,8 @@ import * as i1 from '@angular/common';
|
|
|
25
25
|
* Used to provide a table to some of the subcomponents without causing a circular dependency.
|
|
26
26
|
*/
|
|
27
27
|
declare const CUTE_TABLE: InjectionToken<CuteTable<any>>;
|
|
28
|
-
/** Type of table borders
|
|
29
|
-
type TableBorders = "all" | "none";
|
|
28
|
+
/** Type of table borders: `all` - on all sides of the table and cells, `rows` - line-divider of table rows, `none` - without borders. */
|
|
29
|
+
type TableBorders = "all" | "none" | "rows";
|
|
30
30
|
/**
|
|
31
31
|
* Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
|
|
32
32
|
* tables that animate rows.
|
|
@@ -38,6 +38,9 @@ declare class CuteRecycleRows {
|
|
|
38
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuteRecycleRows, never>;
|
|
39
39
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteRecycleRows, "cute-table[recycleRows], table[cute-table][recycleRows]", never, {}, {}, never, never, true, never>;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
41
44
|
declare class CuteTable<T> extends CdkTable<T> implements OnInit {
|
|
42
45
|
/** Overrides the sticky CSS class set by the `CdkTable`. */
|
|
43
46
|
protected stickyCssClass: string;
|
|
@@ -50,16 +53,16 @@ declare class CuteTable<T> extends CdkTable<T> implements OnInit {
|
|
|
50
53
|
borderColor: ThemeColor | undefined;
|
|
51
54
|
/** Adds zebra-striping to any table row within the `<tbody>`. */
|
|
52
55
|
stripedRows: boolean;
|
|
53
|
-
/** Adds zebra-striping to any table column */
|
|
56
|
+
/** Adds zebra-striping to any table column. */
|
|
54
57
|
stripedColumns: boolean;
|
|
55
|
-
/** Enables a hover state on table rows within a `<tbody
|
|
58
|
+
/** Enables a hover state on table rows within a `<tbody>`. */
|
|
56
59
|
hoveredRows: boolean;
|
|
57
|
-
/** Makes a `<table>` more compact */
|
|
60
|
+
/** Makes a `<table>` more compact. */
|
|
58
61
|
get compact(): boolean;
|
|
59
62
|
set compact(value: boolean);
|
|
60
63
|
private _compact;
|
|
61
64
|
/** What table borders to display. */
|
|
62
|
-
displayBorders: TableBorders
|
|
65
|
+
displayBorders: TableBorders;
|
|
63
66
|
/**
|
|
64
67
|
* Adds a thicker border, darker between table groups — `<thead>`, `<tbody>`, and `<tfoot>`.
|
|
65
68
|
* @experimental
|
|
@@ -227,10 +230,10 @@ declare class CuteNoDataRow extends CdkNoDataRow {
|
|
|
227
230
|
|
|
228
231
|
/**
|
|
229
232
|
* Data source that accepts a client-side data array and includes native support of filtering,
|
|
230
|
-
* sorting (using CuteSort), and pagination (using CutePaginator).
|
|
233
|
+
* sorting (using `CuteSort`), and pagination (using `CutePaginator`).
|
|
231
234
|
*
|
|
232
|
-
* Allows for sort customization by overriding sortingDataAccessor
|
|
233
|
-
* properties are accessed. It also allows for filter customization by overriding filterPredicate
|
|
235
|
+
* Allows for sort customization by overriding `sortingDataAccessor`, which defines how data
|
|
236
|
+
* properties are accessed. It also allows for filter customization by overriding `filterPredicate`,
|
|
234
237
|
* which defines how row data is converted to a string for filter matching.
|
|
235
238
|
*
|
|
236
239
|
* **Note:** This class is meant to be a simple data source to help you get started. As such,
|
|
@@ -269,8 +272,8 @@ declare class CuteTableDataSource<T, P extends CutePaginator = CutePaginator> ex
|
|
|
269
272
|
get filter(): string;
|
|
270
273
|
set filter(filter: string);
|
|
271
274
|
/**
|
|
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.
|
|
275
|
+
* Instance of the `CuteSort` directive used by the table to control its sorting. Sort changes
|
|
276
|
+
* emitted by the `CuteSort` will trigger an update to the table's rendered data.
|
|
274
277
|
*/
|
|
275
278
|
get sort(): CuteSort | null;
|
|
276
279
|
set sort(sort: CuteSort | null);
|
|
@@ -299,15 +302,15 @@ declare class CuteTableDataSource<T, P extends CutePaginator = CutePaginator> ex
|
|
|
299
302
|
*/
|
|
300
303
|
sortingDataAccessor: (data: T, sortHeaderId: string) => string | number;
|
|
301
304
|
/**
|
|
302
|
-
* Gets a sorted copy of the data array based on the state of the CuteSort
|
|
303
|
-
* after changes are made to the filtered data or when sort changes are emitted from CuteSort
|
|
305
|
+
* Gets a sorted copy of the data array based on the state of the `CuteSort`. Called
|
|
306
|
+
* after changes are made to the filtered data or when sort changes are emitted from `CuteSort`.
|
|
304
307
|
* 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
|
|
308
|
+
* by retrieving data using the {@link sortingDataAccessor}. May be overridden for a custom implementation
|
|
306
309
|
* of data ordering.
|
|
307
310
|
* @param data The array of data that should be sorted.
|
|
308
|
-
* @param sort The connected CuteSort that holds the current sort state.
|
|
311
|
+
* @param sort The connected `CuteSort` that holds the current sort state.
|
|
309
312
|
*/
|
|
310
|
-
sortData: (data: T[], sort:
|
|
313
|
+
sortData: (data: T[], sort: Sort) => T[];
|
|
311
314
|
/**
|
|
312
315
|
* Checks if a data object matches the data source's filter string. By default, each data object
|
|
313
316
|
* is converted to a string of its properties and returns true if the filter has
|
|
@@ -328,12 +331,12 @@ declare class CuteTableDataSource<T, P extends CutePaginator = CutePaginator> ex
|
|
|
328
331
|
protected _updateChangeSubscription(): void;
|
|
329
332
|
/**
|
|
330
333
|
* 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
|
|
334
|
+
* the result of the {@link filterPredicate} function. If no filter is set, return the data array
|
|
332
335
|
* as provided.
|
|
333
336
|
*/
|
|
334
337
|
protected _filterData(data: T[]): T[];
|
|
335
338
|
/**
|
|
336
|
-
* Returns a sorted copy of the data if CuteSort has a sort applied, otherwise just returns the
|
|
339
|
+
* Returns a sorted copy of the data if `CuteSort` has a sort applied, otherwise just returns the
|
|
337
340
|
* data array as provided. Uses the default data accessor for data lookup, unless a
|
|
338
341
|
* sortDataAccessor function is defined.
|
|
339
342
|
*/
|
|
@@ -350,11 +353,11 @@ declare class CuteTableDataSource<T, P extends CutePaginator = CutePaginator> ex
|
|
|
350
353
|
*/
|
|
351
354
|
protected _updatePaginator(filteredDataLength: number): void;
|
|
352
355
|
/**
|
|
353
|
-
* Used by the CuteTable. Called when it connects to the data source.
|
|
356
|
+
* Used by the {@link CuteTable}. Called when it connects to the data source.
|
|
354
357
|
*/
|
|
355
358
|
connect(): BehaviorSubject<T[]>;
|
|
356
359
|
/**
|
|
357
|
-
* Used by the CuteTable. Called when it disconnects from the data source.
|
|
360
|
+
* Used by the {@link CuteTable}. Called when it disconnects from the data source.
|
|
358
361
|
*/
|
|
359
362
|
disconnect(): void;
|
|
360
363
|
}
|
package/tree/index.d.ts
CHANGED
|
@@ -241,6 +241,7 @@ declare class CuteTreeFlattener<T, F, K = F> {
|
|
|
241
241
|
getLevel: (node: F) => number;
|
|
242
242
|
isExpandable: (node: F) => boolean;
|
|
243
243
|
getChildren: (node: T) => Observable<T[]> | T[] | undefined | null;
|
|
244
|
+
private _subscription;
|
|
244
245
|
constructor(transformFunction: (node: T, level: number) => F, getLevel: (node: F) => number, isExpandable: (node: F) => boolean, getChildren: (node: T) => Observable<T[]> | T[] | undefined | null);
|
|
245
246
|
private _flattenNode;
|
|
246
247
|
private _flattenChildren;
|
|
@@ -255,6 +256,10 @@ declare class CuteTreeFlattener<T, F, K = F> {
|
|
|
255
256
|
* The returned list may have different length.
|
|
256
257
|
*/
|
|
257
258
|
expandFlattenedNodes(nodes: F[], treeControl: TreeControl<F, K>): F[];
|
|
259
|
+
/**
|
|
260
|
+
* Performs the final actions with the flattener before destroying it.
|
|
261
|
+
*/
|
|
262
|
+
finalize(): void;
|
|
258
263
|
}
|
|
259
264
|
/**
|
|
260
265
|
* Data source for a flat tree.
|