@cute-widgets/base 20.0.3 → 20.0.5
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 +31 -4
- package/abstract/index.d.ts +13 -4
- package/button/index.d.ts +47 -24
- package/button-toggle/index.d.ts +8 -4
- package/card/index.d.ts +9 -6
- package/collapse/index.d.ts +49 -48
- package/core/directives/index.d.ts +1 -31
- package/core/index.d.ts +41 -28
- package/core/interfaces/index.d.ts +1 -1
- package/core/layout/index.d.ts +40 -27
- package/core/nav/index.d.ts +1 -2
- package/dialog/index.d.ts +81 -57
- package/expansion/index.d.ts +5 -18
- package/fesm2022/cute-widgets-base-abstract.mjs +13 -8
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button-toggle.mjs +36 -29
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button.mjs +169 -104
- 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 -18
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-collapse.mjs +114 -126
- package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs +4 -72
- 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 +76 -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-theming.mjs +1 -1
- package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core.mjs +77 -41
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-dialog.mjs +152 -117
- 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-menu.mjs +5 -27
- package/fesm2022/cute-widgets-base-menu.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-navbar.mjs +88 -42
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-paginator.mjs +13 -11
- 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 +60 -257
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-table.mjs +6 -3
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tabs.mjs +86 -61
- package/fesm2022/cute-widgets-base-tabs.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 +30 -9
- package/package.json +6 -5
- package/paginator/index.d.ts +6 -17
- package/radio/index.d.ts +0 -1
- package/sidenav/index.d.ts +1 -2
- package/sort/index.d.ts +22 -135
- package/table/index.d.ts +8 -8
- package/tabs/index.d.ts +35 -14
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' | '';
|
|
@@ -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.
|
|
@@ -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
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.
|
|
@@ -53,16 +53,16 @@ declare class CuteTable<T> extends CdkTable<T> implements OnInit {
|
|
|
53
53
|
borderColor: ThemeColor | undefined;
|
|
54
54
|
/** Adds zebra-striping to any table row within the `<tbody>`. */
|
|
55
55
|
stripedRows: boolean;
|
|
56
|
-
/** Adds zebra-striping to any table column */
|
|
56
|
+
/** Adds zebra-striping to any table column. */
|
|
57
57
|
stripedColumns: boolean;
|
|
58
|
-
/** Enables a hover state on table rows within a `<tbody
|
|
58
|
+
/** Enables a hover state on table rows within a `<tbody>`. */
|
|
59
59
|
hoveredRows: boolean;
|
|
60
|
-
/** Makes a `<table>` more compact */
|
|
60
|
+
/** Makes a `<table>` more compact. */
|
|
61
61
|
get compact(): boolean;
|
|
62
62
|
set compact(value: boolean);
|
|
63
63
|
private _compact;
|
|
64
64
|
/** What table borders to display. */
|
|
65
|
-
displayBorders: TableBorders
|
|
65
|
+
displayBorders: TableBorders;
|
|
66
66
|
/**
|
|
67
67
|
* Adds a thicker border, darker between table groups — `<thead>`, `<tbody>`, and `<tfoot>`.
|
|
68
68
|
* @experimental
|
|
@@ -310,7 +310,7 @@ declare class CuteTableDataSource<T, P extends CutePaginator = CutePaginator> ex
|
|
|
310
310
|
* @param data The array of data that should be sorted.
|
|
311
311
|
* @param sort The connected `CuteSort` that holds the current sort state.
|
|
312
312
|
*/
|
|
313
|
-
sortData: (data: T[], sort:
|
|
313
|
+
sortData: (data: T[], sort: Sort) => T[];
|
|
314
314
|
/**
|
|
315
315
|
* Checks if a data object matches the data source's filter string. By default, each data object
|
|
316
316
|
* is converted to a string of its properties and returns true if the filter has
|
package/tabs/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import * as _cute_widgets_base_tabs from '@cute-widgets/base/tabs';
|
|
|
4
4
|
import { CuteFocusableControl, CuteLayoutControl } from '@cute-widgets/base/abstract';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import { CuteNavLink, CuteNavStretch, CuteNavChangeEvent, CuteNavChangingEvent } from '@cute-widgets/base/core/nav';
|
|
7
|
-
import * as _angular_animations from '@angular/animations';
|
|
8
7
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
8
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
10
9
|
import { ContentAlignment, ViewportEdge } from '@cute-widgets/base/core';
|
|
@@ -16,19 +15,20 @@ import * as i1 from '@angular/common';
|
|
|
16
15
|
*/
|
|
17
16
|
declare const CUTE_TAB: InjectionToken<CuteTab>;
|
|
18
17
|
declare class CuteTab extends CuteFocusableControl {
|
|
19
|
-
protected _tabGroup: _cute_widgets_base_tabs.CuteTabGroup | null;
|
|
20
18
|
private _intersectionRatio;
|
|
19
|
+
protected _closestTabGroup: _cute_widgets_base_tabs.CuteTabGroup | null;
|
|
20
|
+
protected _animationEnabled: boolean;
|
|
21
21
|
/** Plain text label for the tab, used when there is no template label. */
|
|
22
22
|
textLabel: string;
|
|
23
23
|
/** Explicit reference to the external content template. */
|
|
24
24
|
contentTemplate: TemplateRef<any> | undefined;
|
|
25
|
-
/** Lazy loading label's outlet context */
|
|
25
|
+
/** Lazy loading label's outlet context. */
|
|
26
26
|
labelContext: any;
|
|
27
|
-
/** Lazy loading content's outlet context */
|
|
27
|
+
/** Lazy loading content's outlet context. */
|
|
28
28
|
contentContext: any;
|
|
29
29
|
/** Whether the tab is closable. */
|
|
30
30
|
closable: boolean;
|
|
31
|
-
/** Whether the tab preserves lazing content */
|
|
31
|
+
/** Whether the tab preserves lazing content. */
|
|
32
32
|
preserveContent: boolean | undefined;
|
|
33
33
|
/** Content for the tab label given by `<ng-template cute-tab-label>`. */
|
|
34
34
|
readonly _templateLabel: TemplateRef<any> | undefined;
|
|
@@ -45,7 +45,7 @@ declare class CuteTab extends CuteFocusableControl {
|
|
|
45
45
|
/** Whether the tab is intersected the containing box and needs to scroll to display its full size */
|
|
46
46
|
get scrollNeeded(): boolean;
|
|
47
47
|
/** Whether the tab was added dynamically */
|
|
48
|
-
|
|
48
|
+
_isDynamic: boolean;
|
|
49
49
|
protected isPreserveContent(): boolean;
|
|
50
50
|
/** Tab content defined by <ng-template cute-tab-content> or directly referenced where the latter has more priority. */
|
|
51
51
|
protected get explicitContent(): TemplateRef<any> | undefined;
|
|
@@ -72,7 +72,18 @@ declare class CuteTab extends CuteFocusableControl {
|
|
|
72
72
|
static ngAcceptInputType_preserveContent: unknown;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
/**
|
|
76
|
+
* @license Apache-2.0
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
79
|
+
*
|
|
80
|
+
* You may not use this file except in compliance with the License
|
|
81
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
82
|
+
*
|
|
83
|
+
* This code is a modification of the `@angular/material` original
|
|
84
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
85
|
+
*/
|
|
86
|
+
|
|
76
87
|
/**
|
|
77
88
|
* Used to provide a tab group to a tab without causing a circular dependency.
|
|
78
89
|
*/
|
|
@@ -160,6 +171,10 @@ declare class CuteTabGroup extends CuteLayoutControl {
|
|
|
160
171
|
get stretchTabs(): CuteNavStretch;
|
|
161
172
|
set stretchTabs(value: CuteNavStretch | boolean | "false" | "true" | undefined);
|
|
162
173
|
private _stretchTabs;
|
|
174
|
+
/** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */
|
|
175
|
+
get animationDuration(): string;
|
|
176
|
+
set animationDuration(value: string | number);
|
|
177
|
+
private _animationDuration;
|
|
163
178
|
/**
|
|
164
179
|
* By default, tabs remove their lazy content from the DOM while it's off-screen. Setting this to _true_ will keep it in the DOM,
|
|
165
180
|
* which will prevent elements like `iframe` and `video` from reloading next time it comes back into the view.
|
|
@@ -168,10 +183,12 @@ declare class CuteTabGroup extends CuteLayoutControl {
|
|
|
168
183
|
/** Whether the tab group will change its height to the height of the currently active tab. */
|
|
169
184
|
dynamicHeight: boolean;
|
|
170
185
|
/**
|
|
171
|
-
* Possible
|
|
186
|
+
* Possible position for the tab header.
|
|
172
187
|
* @default top
|
|
173
188
|
*/
|
|
174
|
-
headerPosition: ViewportEdge;
|
|
189
|
+
get headerPosition(): ViewportEdge;
|
|
190
|
+
set headerPosition(newPosition: ViewportEdge);
|
|
191
|
+
private _headerPosition;
|
|
175
192
|
/** Use `underline` style for horizontal tabs. */
|
|
176
193
|
underlineTabs: boolean;
|
|
177
194
|
/**
|
|
@@ -188,10 +205,12 @@ declare class CuteTabGroup extends CuteLayoutControl {
|
|
|
188
205
|
selectedIndexChange: EventEmitter<number>;
|
|
189
206
|
/** Event emitted when the active tab selection is about to change. */
|
|
190
207
|
selectedTabChanging: EventEmitter<CuteTabChangingEvent>;
|
|
191
|
-
/** Event emitted when the tab selection has changed. */
|
|
208
|
+
/** Event emitted when the tab selection has been changed. */
|
|
192
209
|
selectedTabChange: EventEmitter<CuteTabChangeEvent>;
|
|
193
210
|
/** Event emitted when focus has changed within a tab group. */
|
|
194
211
|
focusChange: EventEmitter<CuteTabChangeEvent>;
|
|
212
|
+
/** Event emitted when the position of tabs header has been changed. */
|
|
213
|
+
headerPositionChange: EventEmitter<ViewportEdge>;
|
|
195
214
|
/** Event emitted after the new tab was added. */
|
|
196
215
|
tabAdded: EventEmitter<void>;
|
|
197
216
|
/** Event emitted after the closable tab was removed. */
|
|
@@ -215,11 +234,13 @@ declare class CuteTabGroup extends CuteLayoutControl {
|
|
|
215
234
|
private setupScrollListener;
|
|
216
235
|
protected scrollHeader(direction: number): void;
|
|
217
236
|
/**
|
|
218
|
-
* Activates tab with specified index.
|
|
237
|
+
* Activates tab with the specified index.
|
|
219
238
|
* @param index Tab index
|
|
220
239
|
* @param origin (optional) Focus origin
|
|
240
|
+
* @returns A promise of a "logical" result, where _true_ means a successful change of the active tab, and _false_ otherwise.
|
|
241
|
+
* @async
|
|
221
242
|
*/
|
|
222
|
-
selectTab(index: number, origin?: FocusOrigin):
|
|
243
|
+
selectTab(index: number, origin?: FocusOrigin): Promise<boolean>;
|
|
223
244
|
private _createChangeEvent;
|
|
224
245
|
private _createChangingEvent;
|
|
225
246
|
protected onNavFocusChange(event: CuteNavChangeEvent): void;
|
|
@@ -252,7 +273,7 @@ declare class CuteTabGroup extends CuteLayoutControl {
|
|
|
252
273
|
ngAfterContentInit(): void;
|
|
253
274
|
ngOnDestroy(): void;
|
|
254
275
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuteTabGroup, never>;
|
|
255
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuteTabGroup, "cute-tab-group", ["cuteTabGroup"], { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "alignTabs": { "alias": "cute-align-tabs"; "required": false; }; "stretchTabs": { "alias": "cute-stretch-tabs"; "required": false; }; "preserveContent": { "alias": "preserveContent"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "underlineTabs": { "alias": "underlineTabs"; "required": false; }; "dragEnabled": { "alias": "dragEnabled"; "required": false; }; "tabScrollingAlignment": { "alias": "tabScrollingAlignment"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "selectedTabChanging": "selectedTabChanging"; "selectedTabChange": "selectedTabChange"; "focusChange": "focusChange"; "tabAdded": "tabAdded"; "tabRemoved": "tabRemoved"; }, ["tabs"], ["*"], true, never>;
|
|
276
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteTabGroup, "cute-tab-group", ["cuteTabGroup"], { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "alignTabs": { "alias": "cute-align-tabs"; "required": false; }; "stretchTabs": { "alias": "cute-stretch-tabs"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "preserveContent": { "alias": "preserveContent"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "underlineTabs": { "alias": "underlineTabs"; "required": false; }; "dragEnabled": { "alias": "dragEnabled"; "required": false; }; "tabScrollingAlignment": { "alias": "tabScrollingAlignment"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "selectedTabChanging": "selectedTabChanging"; "selectedTabChange": "selectedTabChange"; "focusChange": "focusChange"; "headerPositionChange": "headerPositionChange"; "tabAdded": "tabAdded"; "tabRemoved": "tabRemoved"; }, ["tabs"], ["*"], true, never>;
|
|
256
277
|
static ngAcceptInputType_selectedIndex: unknown;
|
|
257
278
|
static ngAcceptInputType_preserveContent: unknown;
|
|
258
279
|
static ngAcceptInputType_dynamicHeight: unknown;
|
|
@@ -304,4 +325,4 @@ declare class CuteTabsModule {
|
|
|
304
325
|
static ɵinj: i0.ɵɵInjectorDeclaration<CuteTabsModule>;
|
|
305
326
|
}
|
|
306
327
|
|
|
307
|
-
export { CUTE_TAB, CUTE_TAB_CONTENT, CUTE_TAB_GROUP, CUTE_TAB_LABEL, CuteTab, CuteTabChangeEvent, CuteTabChangingEvent, CuteTabContent, CuteTabGroup, CuteTabLabel, CuteTabsModule
|
|
328
|
+
export { CUTE_TAB, CUTE_TAB_CONTENT, CUTE_TAB_GROUP, CUTE_TAB_LABEL, CuteTab, CuteTabChangeEvent, CuteTabChangingEvent, CuteTabContent, CuteTabGroup, CuteTabLabel, CuteTabsModule };
|