@cute-widgets/base 20.0.1 → 20.0.3
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 +13 -1
- package/core/directives/index.d.ts +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-select.mjs +132 -94
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sort.mjs +4 -4
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-table.mjs +16 -13
- 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 +1 -3
- package/fesm2022/cute-widgets-base.mjs.map +1 -1
- package/package.json +16 -17
- package/select/index.d.ts +21 -44
- package/sort/index.d.ts +4 -4
- package/table/index.d.ts +16 -13
- package/tree/index.d.ts +5 -0
- package/cute-widgets-base-20.0.1.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cute-widgets/base",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"homepage": "https://github.com/cute-widgets/base#README.md",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "git+https://github.com/cute-widgets/base.git"
|
|
@@ -91,6 +90,10 @@
|
|
|
91
90
|
"types": "./core/index.d.ts",
|
|
92
91
|
"default": "./fesm2022/cute-widgets-base-core.mjs"
|
|
93
92
|
},
|
|
93
|
+
"./datepicker": {
|
|
94
|
+
"types": "./datepicker/index.d.ts",
|
|
95
|
+
"default": "./fesm2022/cute-widgets-base-datepicker.mjs"
|
|
96
|
+
},
|
|
94
97
|
"./dialog": {
|
|
95
98
|
"types": "./dialog/index.d.ts",
|
|
96
99
|
"default": "./fesm2022/cute-widgets-base-dialog.mjs"
|
|
@@ -175,9 +178,9 @@
|
|
|
175
178
|
"types": "./stepper/index.d.ts",
|
|
176
179
|
"default": "./fesm2022/cute-widgets-base-stepper.mjs"
|
|
177
180
|
},
|
|
178
|
-
"./
|
|
179
|
-
"types": "./
|
|
180
|
-
"default": "./fesm2022/cute-widgets-base-
|
|
181
|
+
"./table": {
|
|
182
|
+
"types": "./table/index.d.ts",
|
|
183
|
+
"default": "./fesm2022/cute-widgets-base-table.mjs"
|
|
181
184
|
},
|
|
182
185
|
"./tabs": {
|
|
183
186
|
"types": "./tabs/index.d.ts",
|
|
@@ -199,10 +202,6 @@
|
|
|
199
202
|
"types": "./tree/index.d.ts",
|
|
200
203
|
"default": "./fesm2022/cute-widgets-base-tree.mjs"
|
|
201
204
|
},
|
|
202
|
-
"./table": {
|
|
203
|
-
"types": "./table/index.d.ts",
|
|
204
|
-
"default": "./fesm2022/cute-widgets-base-table.mjs"
|
|
205
|
-
},
|
|
206
205
|
"./core/animation": {
|
|
207
206
|
"types": "./core/animation/index.d.ts",
|
|
208
207
|
"default": "./fesm2022/cute-widgets-base-core-animation.mjs"
|
|
@@ -227,26 +226,26 @@
|
|
|
227
226
|
"types": "./core/layout/index.d.ts",
|
|
228
227
|
"default": "./fesm2022/cute-widgets-base-core-layout.mjs"
|
|
229
228
|
},
|
|
230
|
-
"./core/line": {
|
|
231
|
-
"types": "./core/line/index.d.ts",
|
|
232
|
-
"default": "./fesm2022/cute-widgets-base-core-line.mjs"
|
|
233
|
-
},
|
|
234
229
|
"./core/nav": {
|
|
235
230
|
"types": "./core/nav/index.d.ts",
|
|
236
231
|
"default": "./fesm2022/cute-widgets-base-core-nav.mjs"
|
|
237
232
|
},
|
|
233
|
+
"./core/line": {
|
|
234
|
+
"types": "./core/line/index.d.ts",
|
|
235
|
+
"default": "./fesm2022/cute-widgets-base-core-line.mjs"
|
|
236
|
+
},
|
|
238
237
|
"./core/observers": {
|
|
239
238
|
"types": "./core/observers/index.d.ts",
|
|
240
239
|
"default": "./fesm2022/cute-widgets-base-core-observers.mjs"
|
|
241
240
|
},
|
|
242
|
-
"./core/pipes": {
|
|
243
|
-
"types": "./core/pipes/index.d.ts",
|
|
244
|
-
"default": "./fesm2022/cute-widgets-base-core-pipes.mjs"
|
|
245
|
-
},
|
|
246
241
|
"./core/option": {
|
|
247
242
|
"types": "./core/option/index.d.ts",
|
|
248
243
|
"default": "./fesm2022/cute-widgets-base-core-option.mjs"
|
|
249
244
|
},
|
|
245
|
+
"./core/pipes": {
|
|
246
|
+
"types": "./core/pipes/index.d.ts",
|
|
247
|
+
"default": "./fesm2022/cute-widgets-base-core-pipes.mjs"
|
|
248
|
+
},
|
|
250
249
|
"./core/ripple": {
|
|
251
250
|
"types": "./core/ripple/index.d.ts",
|
|
252
251
|
"default": "./fesm2022/cute-widgets-base-core-ripple.mjs"
|
package/select/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
-
import { ScrollStrategy,
|
|
2
|
+
import { ScrollStrategy, ConnectedPosition, CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
3
3
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, DoCheck, NgZone, QueryList, ElementRef, EventEmitter, SimpleChanges } from '@angular/core';
|
|
@@ -11,7 +11,6 @@ import { RelativeSize } from '@cute-widgets/base/core/types';
|
|
|
11
11
|
import { CuteFormFieldControl, CuteFormField } from '@cute-widgets/base/form-field';
|
|
12
12
|
import { ErrorStateMatcher } from '@cute-widgets/base/core/error';
|
|
13
13
|
import { CuteInputDropdownControl } from '@cute-widgets/base/abstract';
|
|
14
|
-
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
15
14
|
import * as i1 from '@angular/common';
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -28,8 +27,6 @@ import * as i1 from '@angular/common';
|
|
|
28
27
|
|
|
29
28
|
/** Injection token that determines the scroll handling while a select is open. */
|
|
30
29
|
declare const CUTE_SELECT_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
31
|
-
/** @docs-private */
|
|
32
|
-
declare function CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
|
|
33
30
|
/** Object that can be used to configure the default options for the select module. */
|
|
34
31
|
interface CuteSelectConfig {
|
|
35
32
|
/** Whether option centering should be disabled. */
|
|
@@ -58,12 +55,6 @@ interface CuteSelectConfig {
|
|
|
58
55
|
}
|
|
59
56
|
/** Injection token that can be used to provide the default options the select module. */
|
|
60
57
|
declare const CUTE_SELECT_CONFIG: InjectionToken<CuteSelectConfig>;
|
|
61
|
-
/** @docs-private */
|
|
62
|
-
declare const CUTE_SELECT_SCROLL_STRATEGY_PROVIDER: {
|
|
63
|
-
provide: InjectionToken<() => ScrollStrategy>;
|
|
64
|
-
deps: (typeof Overlay)[];
|
|
65
|
-
useFactory: typeof CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY;
|
|
66
|
-
};
|
|
67
58
|
/**
|
|
68
59
|
* Injection token that can be used to reference instances of `CuteSelectTrigger`. It serves as
|
|
69
60
|
* an alternative token to the actual `CuteSelectTrigger` class which could cause unnecessary
|
|
@@ -90,12 +81,16 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
|
|
|
90
81
|
ngControl: NgControl;
|
|
91
82
|
private _liveAnnouncer;
|
|
92
83
|
protected _defaultOptions: CuteSelectConfig | null;
|
|
84
|
+
protected _animationsDisabled: boolean;
|
|
85
|
+
private _initialized;
|
|
86
|
+
private _cleanupDetach;
|
|
93
87
|
/** All the defined select options. */
|
|
94
88
|
options: QueryList<CuteOption> | undefined;
|
|
95
89
|
/** All of the defined groups of options. */
|
|
96
90
|
optionGroups: QueryList<CuteOptgroup> | undefined;
|
|
97
91
|
/** User-supplied override of the trigger element. */
|
|
98
92
|
customTrigger: CuteSelectTrigger | undefined;
|
|
93
|
+
protected get bsColorVarName(): string;
|
|
99
94
|
/**
|
|
100
95
|
* This position config ensures that the top "start" corner of the overlay
|
|
101
96
|
* is aligned with the top "start" of the origin by default (overlapping
|
|
@@ -222,7 +217,7 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
|
|
|
222
217
|
* By default, selecting an option with a `null` or `undefined` value will reset the select's
|
|
223
218
|
* value. Enable this option if the reset behavior doesn't match your requirements and instead,
|
|
224
219
|
* the nullable options should become selected. The value of this input can be controlled app-wide
|
|
225
|
-
* using the `
|
|
220
|
+
* using the `CUTE_SELECT_CONFIG` injection token.
|
|
226
221
|
*/
|
|
227
222
|
canSelectNullableOptions: boolean;
|
|
228
223
|
/** Combined stream of all of the child options' change events. */
|
|
@@ -280,6 +275,10 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
|
|
|
280
275
|
private _clearFromModal;
|
|
281
276
|
/** Closes the overlay panel and focuses the host element. */
|
|
282
277
|
close(): void;
|
|
278
|
+
/** Triggers the exit animation and detaches the overlay at the end. */
|
|
279
|
+
private _exitAndDetach;
|
|
280
|
+
/** Detaches the current overlay directive. */
|
|
281
|
+
private _detachOverlay;
|
|
283
282
|
/**
|
|
284
283
|
* Sets the select' value. Part of the ControlValueAccessor interface
|
|
285
284
|
* required to integrate with Angular core forms API.
|
|
@@ -303,16 +302,14 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
|
|
|
303
302
|
private _handleClosedKeydown;
|
|
304
303
|
/** Handles keyboard events when the selected is open. */
|
|
305
304
|
private _handleOpenKeydown;
|
|
305
|
+
/** Handles keyboard events coming from the overlay. */
|
|
306
|
+
protected _handleOverlayKeydown(event: KeyboardEvent): void;
|
|
306
307
|
_onFocus(): void;
|
|
307
308
|
/**
|
|
308
309
|
* Calls the touched callback only if the panel is closed. Otherwise, the trigger will
|
|
309
310
|
* "blur" to the panel when it opens, causing a false positive.
|
|
310
311
|
*/
|
|
311
312
|
_onBlur(): void;
|
|
312
|
-
/**
|
|
313
|
-
* Callback that is invoked when the overlay panel has been attached.
|
|
314
|
-
*/
|
|
315
|
-
_onAttached(): void;
|
|
316
313
|
/** Returns the theme to be used on the panel. */
|
|
317
314
|
_getPanelTheme(): string;
|
|
318
315
|
/** Whether the select has a value. */
|
|
@@ -360,8 +357,11 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
|
|
|
360
357
|
protected _getAriaActiveDescendant(): string | null;
|
|
361
358
|
/** Gets the aria-labelledby of the select component trigger. */
|
|
362
359
|
private _getTriggerAriaLabelledby;
|
|
363
|
-
/**
|
|
364
|
-
|
|
360
|
+
/**
|
|
361
|
+
* Implemented as part of CuteFormFieldControl.
|
|
362
|
+
* @docs-private
|
|
363
|
+
*/
|
|
364
|
+
get describedByIds(): string[];
|
|
365
365
|
/**
|
|
366
366
|
* Implemented as part of CuteFormFieldControl.
|
|
367
367
|
*/
|
|
@@ -369,11 +369,13 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
|
|
|
369
369
|
/**
|
|
370
370
|
* Implemented as part of CuteFormFieldControl.
|
|
371
371
|
*/
|
|
372
|
-
onContainerClick(): void;
|
|
372
|
+
onContainerClick(event: MouseEvent): void;
|
|
373
373
|
/**
|
|
374
374
|
* Implemented as part of CuteFormFieldControl.
|
|
375
375
|
*/
|
|
376
376
|
get shouldLabelFloat(): boolean;
|
|
377
|
+
/** `input` element gets focus. */
|
|
378
|
+
protected onInputFocus(event: FocusEvent): void;
|
|
377
379
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSelect, never>;
|
|
378
380
|
static ɵcmp: i0.ɵɵComponentDeclaration<CuteSelect, "cute-select", ["cuteSelect"], { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disableOptionCentering": { "alias": "disableOptionCentering"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "value": { "alias": "value"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "magnitude": { "alias": "magnitude"; "required": false; }; "typeaheadDebounceInterval": { "alias": "typeaheadDebounceInterval"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "panelHeight": { "alias": "panelHeight"; "required": false; }; "canSelectNullableOptions": { "alias": "canSelectNullableOptions"; "required": false; }; }, { "openedChange": "openedChange"; "_openedStream": "opened"; "_closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["customTrigger", "options", "optionGroups"], ["cute-select-trigger", "*"], true, never>;
|
|
379
381
|
static ngAcceptInputType_disableRipple: unknown;
|
|
@@ -391,36 +393,11 @@ declare class CuteSelectTrigger {
|
|
|
391
393
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteSelectTrigger, "cute-select-trigger", never, {}, {}, never, never, true, never>;
|
|
392
394
|
}
|
|
393
395
|
|
|
394
|
-
/**
|
|
395
|
-
* @license Apache-2.0
|
|
396
|
-
*
|
|
397
|
-
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
398
|
-
*
|
|
399
|
-
* You may not use this file except in compliance with the License
|
|
400
|
-
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
401
|
-
*/
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* The following are all the animations for the mat-select component, with each
|
|
405
|
-
* const containing the metadata for one animation.
|
|
406
|
-
*
|
|
407
|
-
* The values below match the implementation of the AngularJS Material mat-select animation.
|
|
408
|
-
* @docs-private
|
|
409
|
-
*/
|
|
410
|
-
declare const cuteSelectAnimations: {
|
|
411
|
-
/**
|
|
412
|
-
* @deprecated No longer being used. To be removed.
|
|
413
|
-
* @breaking-change 12.0.0
|
|
414
|
-
*/
|
|
415
|
-
readonly transformPanelWrap: AnimationTriggerMetadata;
|
|
416
|
-
readonly transformPanel: AnimationTriggerMetadata;
|
|
417
|
-
};
|
|
418
|
-
|
|
419
396
|
declare class CuteSelectModule {
|
|
420
397
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSelectModule, never>;
|
|
421
398
|
static ɵmod: i0.ɵɵNgModuleDeclaration<CuteSelectModule, never, [typeof i1.CommonModule, typeof CuteSelect, typeof CuteSelectTrigger, typeof i3.CuteOptgroup, typeof i3.CuteOption], [typeof CuteSelect, typeof CuteSelectTrigger, typeof i3.CuteOptgroup, typeof i3.CuteOption]>;
|
|
422
399
|
static ɵinj: i0.ɵɵInjectorDeclaration<CuteSelectModule>;
|
|
423
400
|
}
|
|
424
401
|
|
|
425
|
-
export { CUTE_SELECT_CONFIG, CUTE_SELECT_SCROLL_STRATEGY,
|
|
402
|
+
export { CUTE_SELECT_CONFIG, CUTE_SELECT_SCROLL_STRATEGY, CUTE_SELECT_TRIGGER, CuteSelect, CuteSelectChange, CuteSelectModule, CuteSelectTrigger };
|
|
426
403
|
export type { CuteSelectConfig };
|
package/sort/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ type SortDirection = 'asc' | 'desc' | '';
|
|
|
21
21
|
|
|
22
22
|
/** Position of the arrow that displays when sorted. */
|
|
23
23
|
type SortHeaderArrowPosition = 'before' | 'after';
|
|
24
|
-
/** Interface for a directive that holds sorting state consumed by `
|
|
24
|
+
/** Interface for a directive that holds sorting state consumed by `CuteSortHeader`. */
|
|
25
25
|
interface CuteSortable {
|
|
26
26
|
/** The id of the column being sorted. */
|
|
27
27
|
id: string;
|
|
@@ -46,7 +46,7 @@ interface CuteSortDefaultOptions {
|
|
|
46
46
|
}
|
|
47
47
|
/** Injection token to be used to override the default options for `mat-sort`. */
|
|
48
48
|
declare const CUTE_SORT_DEFAULT_OPTIONS: InjectionToken<CuteSortDefaultOptions>;
|
|
49
|
-
/** Container for
|
|
49
|
+
/** Container for CuteSortables to manage the sort state and provide default sort parameters. */
|
|
50
50
|
declare class CuteSort implements OnChanges, OnDestroy, OnInit {
|
|
51
51
|
private _defaultOptions?;
|
|
52
52
|
private _initializedStream;
|
|
@@ -229,7 +229,7 @@ declare class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterVi
|
|
|
229
229
|
/** whether the sort header is disabled. */
|
|
230
230
|
disabled: boolean;
|
|
231
231
|
/**
|
|
232
|
-
* Description applied to
|
|
232
|
+
* Description applied to CuteSortHeader's button element with aria-describedby. This text should
|
|
233
233
|
* describe the action that will occur when the user clicks the sort header.
|
|
234
234
|
*/
|
|
235
235
|
get sortActionDescription(): string;
|
|
@@ -263,7 +263,7 @@ declare class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterVi
|
|
|
263
263
|
_toggleOnInteraction(): void;
|
|
264
264
|
_handleClick(): void;
|
|
265
265
|
_handleKeydown(event: KeyboardEvent): void;
|
|
266
|
-
/** Whether this
|
|
266
|
+
/** Whether this CuteSortHeader is currently sorted in either ascending or descending order. */
|
|
267
267
|
_isSorted(): boolean;
|
|
268
268
|
/** Returns the animation state for the arrow direction (indicator and pointers). */
|
|
269
269
|
_getArrowDirectionState(): string;
|
package/table/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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,13 +302,13 @@ 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
313
|
sortData: (data: T[], sort: CuteSort) => T[];
|
|
311
314
|
/**
|
|
@@ -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.
|
|
Binary file
|