@porscheinformatik/clr-addons 19.9.13 → 19.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/clr-addons.mjs +1201 -634
- package/fesm2022/clr-addons.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/clr-addons-phs.css +118 -4
- package/styles/clr-addons-phs.css.map +1 -1
- package/styles/clr-addons-phs.min.css +1 -1
- package/styles/clr-addons-phs.min.css.map +1 -1
- package/treetable/built-in/filter/treetable-string-filter.d.ts +24 -0
- package/treetable/enums/selection-type.d.ts +5 -0
- package/treetable/index.d.ts +5 -0
- package/treetable/interfaces/filter-model.d.ts +37 -0
- package/treetable/interfaces/treetable-model.d.ts +55 -0
- package/treetable/interfaces/treetable-state-model.d.ts +20 -0
- package/treetable/providers/filters.d.ts +29 -0
- package/treetable/providers/index.d.ts +1 -2
- package/treetable/providers/sort.d.ts +15 -14
- package/treetable/providers/treetable-data-state.service.d.ts +37 -0
- package/treetable/providers/treetable-recursion.service.d.ts +17 -0
- package/treetable/renderer/main-renderer.d.ts +2 -2
- package/treetable/treetable-action-overflow.d.ts +4 -7
- package/treetable/treetable-column.d.ts +11 -16
- package/treetable/treetable-filter.d.ts +18 -0
- package/treetable/treetable-items.d.ts +21 -14
- package/treetable/treetable-recursive-rows.d.ts +12 -0
- package/treetable/treetable-row-checkbox.d.ts +10 -0
- package/treetable/treetable-row.d.ts +23 -30
- package/treetable/treetable.d.ts +23 -28
- package/treetable/treetable.module.d.ts +9 -4
- package/treetable/util/treetable-filter-util.d.ts +22 -0
- package/treetable/util/treetable-state-util.d.ts +10 -0
- package/treetable/providers/items.d.ts +0 -21
- package/treetable/providers/selection.d.ts +0 -28
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ClrTreetableFilterInterface, ClrTreetableStringFilterFunction } from '../../interfaces/filter-model';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ClrTreetableStringFilter<T extends object> implements ClrTreetableFilterInterface<T, string> {
|
|
5
|
+
private readonly smartToggleService;
|
|
6
|
+
private readonly commonStrings;
|
|
7
|
+
private readonly elementRef;
|
|
8
|
+
clrTtStringFilter: import("@angular/core").InputSignal<ClrTreetableStringFilterFunction<T>>;
|
|
9
|
+
clrTtFilterPlaceholder: import("@angular/core").InputSignal<string>;
|
|
10
|
+
clrTtFilterLabel: import("@angular/core").InputSignal<string>;
|
|
11
|
+
clrTtFilterValue: import("@angular/core").ModelSignal<string>;
|
|
12
|
+
private readonly _input;
|
|
13
|
+
private readonly _textChange$;
|
|
14
|
+
protected readonly filterLabel: import("@angular/core").Signal<string>;
|
|
15
|
+
private readonly initialValue$;
|
|
16
|
+
readonly changes: Observable<string>;
|
|
17
|
+
constructor();
|
|
18
|
+
accepts(item: T): boolean;
|
|
19
|
+
isActive(): boolean;
|
|
20
|
+
protected clearFilter(): void;
|
|
21
|
+
protected inputChanged(value: string): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableStringFilter<any>, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableStringFilter<any>, "clr-tt-string-filter", never, { "clrTtStringFilter": { "alias": "clrTtStringFilter"; "required": true; "isSignal": true; }; "clrTtFilterPlaceholder": { "alias": "clrTtFilterPlaceholder"; "required": false; "isSignal": true; }; "clrTtFilterLabel": { "alias": "clrTtFilterLabel"; "required": false; "isSignal": true; }; "clrTtFilterValue": { "alias": "clrTtFilterValue"; "required": false; "isSignal": true; }; }, { "clrTtFilterValue": "clrTtFilterValueChange"; }, never, never, false, never>;
|
|
24
|
+
}
|
package/treetable/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './treetable';
|
|
2
2
|
export * from './treetable-row';
|
|
3
3
|
export * from './treetable-column';
|
|
4
|
+
export * from './treetable-filter';
|
|
4
5
|
export * from './treetable-cell';
|
|
5
6
|
export * from './treetable-placeholder';
|
|
6
7
|
export * from './treetable-action-overflow';
|
|
@@ -8,5 +9,9 @@ export * from './treetable.module';
|
|
|
8
9
|
export * from './renderer';
|
|
9
10
|
export * from './providers';
|
|
10
11
|
export * from './treetable-items';
|
|
12
|
+
export * from './built-in/filter/treetable-string-filter';
|
|
11
13
|
export * from './interfaces/comparator.interface';
|
|
14
|
+
export * from './interfaces/filter-model';
|
|
15
|
+
export * from './interfaces/treetable-model';
|
|
16
|
+
export * from './interfaces/treetable-state-model';
|
|
12
17
|
export * from './enums/sort-order.enum';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Describes a filter that can be registered with the Treetable.
|
|
4
|
+
* @template T The type of the item in the treetable.
|
|
5
|
+
* @template S The type of the filter's value/state (e.g., string, number, etc.).
|
|
6
|
+
*/
|
|
7
|
+
export interface ClrTreetableFilterInterface<T, S = unknown> {
|
|
8
|
+
/**
|
|
9
|
+
* An observable that emits whenever the filter's state changes.
|
|
10
|
+
*/
|
|
11
|
+
readonly changes: Observable<S>;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the filter is currently active.
|
|
14
|
+
* @returns `true` if the filter is active, otherwise `false`.
|
|
15
|
+
*/
|
|
16
|
+
isActive(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Determines if a given item passes the filter's criteria.
|
|
19
|
+
* @param item The item to test.
|
|
20
|
+
* @returns `true` if the item is accepted, otherwise `false`.
|
|
21
|
+
*/
|
|
22
|
+
accepts(item: T): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if the filter is the same as another. Handy for testing.
|
|
25
|
+
* @param other The filter to test equality against.
|
|
26
|
+
* @returns `true` if the filters are equal, otherwise `false`.
|
|
27
|
+
*/
|
|
28
|
+
equals?(other: ClrTreetableFilterInterface<T>): boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A function type that defines how to filter an item of a Treetable based on a string search value.
|
|
32
|
+
* @template T The type of the item in the treetable.
|
|
33
|
+
* @param item The item to be tested against the filter.
|
|
34
|
+
* @param search The string value used for filtering.
|
|
35
|
+
* @returns `true` if the item matches the filter criteria, otherwise `false`.
|
|
36
|
+
*/
|
|
37
|
+
export type ClrTreetableStringFilterFunction<T> = (item: T, search: string) => boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ClrTreetableSelectedState } from '../enums/selection-type';
|
|
2
|
+
/**
|
|
3
|
+
* Function type that returns the direct children of a data node.
|
|
4
|
+
*/
|
|
5
|
+
export type ClrTreetableChildrenFunction<T extends object> = (node: T) => Array<T>;
|
|
6
|
+
/**
|
|
7
|
+
* Represents a single tree node inside the treetable.
|
|
8
|
+
* Maintains derived selection state (SELECTED / UNSELECTED / INDETERMINATE) based on:
|
|
9
|
+
* - Manual selection of this node.
|
|
10
|
+
* - Aggregated selection states of all descendants.
|
|
11
|
+
* Selection propagation to descendants happens only on explicit setSelected calls.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ClrTreetableTreeNode<T extends object> {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly value: T;
|
|
16
|
+
parent: ClrTreetableTreeNode<T> | null;
|
|
17
|
+
children: ClrTreetableTreeNode<T>[];
|
|
18
|
+
/**
|
|
19
|
+
* If true, the node will stay INDETERMINATE even when all descendants are selected
|
|
20
|
+
* unless it was manually selected.
|
|
21
|
+
*/
|
|
22
|
+
private readonly stickyIndeterminate;
|
|
23
|
+
private readonly manuallySelected;
|
|
24
|
+
selected: import("@angular/core").WritableSignal<ClrTreetableSelectedState>;
|
|
25
|
+
constructor(value: T, parent?: ClrTreetableTreeNode<T> | null, children?: ClrTreetableTreeNode<T>[], stickyIndeterminate?: boolean);
|
|
26
|
+
/**
|
|
27
|
+
* Depth level in the tree (root = 0).
|
|
28
|
+
*/
|
|
29
|
+
get depth(): number;
|
|
30
|
+
/**
|
|
31
|
+
* True if this node has no children.
|
|
32
|
+
*/
|
|
33
|
+
get isLeaf(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Sets the selection state for this node and propagates to all descendants (except INDETERMINATE).
|
|
36
|
+
* @param state Desired selection state.
|
|
37
|
+
*/
|
|
38
|
+
setSelected(state: ClrTreetableSelectedState): void;
|
|
39
|
+
/**
|
|
40
|
+
* Returns all descendants as a flat generator.
|
|
41
|
+
*/
|
|
42
|
+
getFlatDescendants(): Generator<ClrTreetableTreeNode<T>>;
|
|
43
|
+
/**
|
|
44
|
+
* Recursively applies a selected/unselected state to all descendants.
|
|
45
|
+
*/
|
|
46
|
+
private propagateToChildren;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates an internal tree node hierarchy from a raw data object.
|
|
50
|
+
*
|
|
51
|
+
* @param value Root raw data object.
|
|
52
|
+
* @param getChildren Function returning direct children of a node.
|
|
53
|
+
* @param stickyIndeterminate Whether to keep INDETERMINATE even if all descendants become selected.
|
|
54
|
+
*/
|
|
55
|
+
export declare function mapToInternalTree<T extends object>(value: T, getChildren: ClrTreetableChildrenFunction<T>, stickyIndeterminate: boolean): ClrTreetableTreeNode<T>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ClrTreetableComparatorInterface } from './comparator.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the current state of the Treetable.
|
|
4
|
+
*
|
|
5
|
+
* @template T Type of the data elements.
|
|
6
|
+
* @template F Type of the filter return value, default is <code>unknown</code>.
|
|
7
|
+
* @property sort Current sort state or null, if no sort is active.
|
|
8
|
+
* - comparator, the comparator used for sorting.
|
|
9
|
+
* - reverse true, if it should be sorted in descending order.
|
|
10
|
+
* Default: null.
|
|
11
|
+
* @property filters Array with the current active filter values. Empty if no filters are active.
|
|
12
|
+
* Default: [].
|
|
13
|
+
*/
|
|
14
|
+
export interface ClrTreetableState<T, F = unknown> {
|
|
15
|
+
sort: {
|
|
16
|
+
comparator: ClrTreetableComparatorInterface<T>;
|
|
17
|
+
reverse: boolean;
|
|
18
|
+
} | null;
|
|
19
|
+
filters: F[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ClrTreetableFilterInterface } from '../interfaces/filter-model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper for a treetable filter instance that holds the filter and its unregister callback.
|
|
5
|
+
*
|
|
6
|
+
* @template T The row data type processed by the treetable.
|
|
7
|
+
* @template F The concrete filter type implementing <code>ClrTreetableFilterInterface</code> for <code>T</code>.
|
|
8
|
+
* @property filter The concrete filter instance.
|
|
9
|
+
* @property unregister Callback to remove this filter from the Filters service.
|
|
10
|
+
*/
|
|
11
|
+
export declare class RegisteredTreetableFilter<T, F extends ClrTreetableFilterInterface<T>> {
|
|
12
|
+
filter: F;
|
|
13
|
+
unregister: () => void;
|
|
14
|
+
constructor(filter: F, unregister: () => void);
|
|
15
|
+
}
|
|
16
|
+
export declare class Filters<T> {
|
|
17
|
+
private readonly _destroyRef;
|
|
18
|
+
private filterId;
|
|
19
|
+
private readonly updateFilterValue$;
|
|
20
|
+
private readonly _filterState;
|
|
21
|
+
private readonly _registeredFilters;
|
|
22
|
+
readonly activeFilters: import("@angular/core").Signal<ClrTreetableFilterInterface<T, unknown>[]>;
|
|
23
|
+
readonly hasActiveFilters: import("@angular/core").Signal<boolean>;
|
|
24
|
+
readonly changes$: import("rxjs").Observable<unknown[]>;
|
|
25
|
+
constructor();
|
|
26
|
+
register<F extends ClrTreetableFilterInterface<T>>(treetableFilter: F): RegisteredTreetableFilter<T, F>;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Filters<any>, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Filters<any>>;
|
|
29
|
+
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
1
|
import { ClrTreetableComparatorInterface } from '../interfaces/comparator.interface';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
get change(): Observable<Sort<T>>;
|
|
3
|
+
export interface TreetableSortState<T extends object> {
|
|
4
|
+
comparator: ClrTreetableComparatorInterface<T> | null;
|
|
5
|
+
reverse: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class Sort<T extends object> {
|
|
8
|
+
private readonly _comparator;
|
|
9
|
+
private readonly _reverse;
|
|
10
|
+
readonly sortState: import("@angular/core").Signal<TreetableSortState<T>>;
|
|
11
|
+
readonly changes$: import("rxjs").Observable<TreetableSortState<T>>;
|
|
14
12
|
/**
|
|
15
13
|
* Sets a comparator as the current one, or toggles reverse if the comparator is already used. The
|
|
16
14
|
* optional forceReverse input parameter allows to override that toggling behavior by sorting in
|
|
17
15
|
* reverse order if `true`.
|
|
18
|
-
*
|
|
19
|
-
* @memberof Sort
|
|
20
16
|
*/
|
|
21
17
|
toggle(sortBy: ClrTreetableComparatorInterface<T>, forceReverse?: boolean): void;
|
|
18
|
+
/**
|
|
19
|
+
* Clears the current comparator
|
|
20
|
+
*/
|
|
22
21
|
clear(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Compares two items using the current comparator and reverse flag
|
|
24
|
+
*/
|
|
23
25
|
compare(a: T, b: T): number;
|
|
24
|
-
emitChange(): void;
|
|
25
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<Sort<any>, never>;
|
|
26
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<Sort<any>>;
|
|
27
28
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ClrTreetableChildrenFunction, ClrTreetableTreeNode } from '../interfaces/treetable-model';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ClrTreetableState } from '../interfaces/treetable-state-model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TreetableDataStateService<T extends object> {
|
|
6
|
+
private readonly _filters;
|
|
7
|
+
private readonly _sort;
|
|
8
|
+
private readonly _dataSource;
|
|
9
|
+
private readonly _stickyIndeterminate;
|
|
10
|
+
private readonly _itemsExternallySelected;
|
|
11
|
+
private readonly _treetableNodes;
|
|
12
|
+
private readonly _filteredNodes;
|
|
13
|
+
readonly displayedNodes: import("@angular/core").Signal<ClrTreetableTreeNode<T>[]>;
|
|
14
|
+
readonly areAllNodesSelected: import("@angular/core").Signal<boolean>;
|
|
15
|
+
readonly selectedNodes: import("@angular/core").Signal<T[]>;
|
|
16
|
+
readonly changes$: Observable<ClrTreetableState<T>>;
|
|
17
|
+
constructor();
|
|
18
|
+
setDataSource(items: T[], getChildren: ClrTreetableChildrenFunction<T>): void;
|
|
19
|
+
setExternallySelectedItems(items: T[]): void;
|
|
20
|
+
setStickyIndeterminate(value: boolean): void;
|
|
21
|
+
toggleSelectionForDisplayedNodes(): void;
|
|
22
|
+
private setSelectionForDisplayedNodes;
|
|
23
|
+
/**
|
|
24
|
+
* Recursively filters the provided <code>ClrTreetableTreeNodes</code>. It returns the lowest depth nodes of the
|
|
25
|
+
* provided nodes, that pass all the filters and it's ancestors. The method returns a cloned subset of the provided nodes.
|
|
26
|
+
*
|
|
27
|
+
* @param nodes The nodes to filter.
|
|
28
|
+
* @param activeFilters The currently active filters that have to be passed.
|
|
29
|
+
* @param parent The parent node to set for the recursive filtering.
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
private filterTreeRecursively;
|
|
33
|
+
private sortTreeRecursively;
|
|
34
|
+
private traverseTreeNodes;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreetableDataStateService<any>, never>;
|
|
36
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TreetableDataStateService<any>>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Optional, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ClrTreetableItemsContext } from '../treetable-items';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ClrTreetableRecursionService<T extends object> {
|
|
5
|
+
private readonly _template;
|
|
6
|
+
readonly recursionTemplate: import("@angular/core").Signal<TemplateRef<ClrTreetableItemsContext<T>>>;
|
|
7
|
+
readonly isRecursionMode: import("@angular/core").Signal<boolean>;
|
|
8
|
+
setTemplate(newTemplate: TemplateRef<ClrTreetableItemsContext<T>> | null): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableRecursionService<any>, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ClrTreetableRecursionService<any>>;
|
|
11
|
+
}
|
|
12
|
+
export declare function treetableRecursionServiceFactory<T extends object>(existing: ClrTreetableRecursionService<T>): ClrTreetableRecursionService<T>;
|
|
13
|
+
export declare const TREETABLE_RECURSION_SERVICE_PROVIDER: {
|
|
14
|
+
provide: typeof ClrTreetableRecursionService;
|
|
15
|
+
useFactory: typeof treetableRecursionServiceFactory;
|
|
16
|
+
deps: Optional[][];
|
|
17
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterContentInit, AfterViewChecked, OnInit, QueryList } from '@angular/core';
|
|
2
2
|
import { ClrTreetableColumn } from '../treetable-column';
|
|
3
3
|
import { TreetableHeaderRenderer } from './header-renderer';
|
|
4
4
|
import { TreetableRowRenderer } from './row-renderer';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TreetableMainRenderer<T> implements OnInit, AfterViewChecked, AfterContentInit {
|
|
6
|
+
export declare class TreetableMainRenderer<T extends object> implements OnInit, AfterViewChecked, AfterContentInit {
|
|
7
7
|
headers: QueryList<TreetableHeaderRenderer>;
|
|
8
8
|
rows: QueryList<TreetableRowRenderer>;
|
|
9
9
|
columns: QueryList<ClrTreetableColumn<T>>;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { NgZone
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
2
|
import { ClrPopoverPosition, ClrPopoverToggleService } from '@clr/angular';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ClrTreetableActionOverflow
|
|
4
|
+
export declare class ClrTreetableActionOverflow {
|
|
6
5
|
private smartToggleService;
|
|
7
6
|
private zone;
|
|
8
|
-
empty: boolean
|
|
7
|
+
empty: import("@angular/core").InputSignal<boolean>;
|
|
9
8
|
smartPosition: ClrPopoverPosition;
|
|
10
|
-
destroyed$: Subject<void>;
|
|
11
9
|
constructor(smartToggleService: ClrPopoverToggleService, zone: NgZone);
|
|
12
10
|
private focusFirstButton;
|
|
13
11
|
closeOverflowContent(event: Event): void;
|
|
14
|
-
ngOnDestroy(): void;
|
|
15
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableActionOverflow, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableActionOverflow, "clr-tt-action-overflow", never, { "empty": { "alias": "empty"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableActionOverflow, "clr-tt-action-overflow", never, { "empty": { "alias": "empty"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
|
|
17
14
|
}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import { ClrTreetableComparatorInterface } from './interfaces/comparator.interface';
|
|
2
2
|
import { ClrTreetableSortOrder } from './enums/sort-order.enum';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
4
|
+
import * as i1 from "@clr/angular";
|
|
5
|
+
export declare class ClrTreetableColumn<T extends object> {
|
|
5
6
|
private readonly _sort;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
private
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
set sortOrder(value: ClrTreetableSortOrder);
|
|
14
|
-
get sortDirection(): 'up' | 'down' | null;
|
|
15
|
-
sortOrderChange: import("@angular/core").OutputEmitterRef<ClrTreetableSortOrder>;
|
|
7
|
+
clrTtSortBy: import("@angular/core").InputSignal<ClrTreetableComparatorInterface<T>>;
|
|
8
|
+
clrTtSortOrder: import("@angular/core").InputSignal<ClrTreetableSortOrder>;
|
|
9
|
+
clrTtSortOrderChange: import("@angular/core").OutputEmitterRef<ClrTreetableSortOrder>;
|
|
10
|
+
private readonly _internalSortOrder;
|
|
11
|
+
protected readonly isSortable: import("@angular/core").Signal<boolean>;
|
|
12
|
+
protected readonly sortDirection: import("@angular/core").Signal<"up" | "down">;
|
|
13
|
+
protected readonly ariaSort: import("@angular/core").Signal<"none" | "ascending" | "descending">;
|
|
16
14
|
constructor();
|
|
17
|
-
|
|
18
|
-
get sortable(): boolean;
|
|
19
|
-
sort(reverse?: boolean): void;
|
|
20
|
-
private listenForSortingChanges;
|
|
15
|
+
protected sort(reverse?: boolean): void;
|
|
21
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableColumn<any>, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableColumn<any>, "clr-tt-column", never, { "
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableColumn<any>, "clr-tt-column", never, { "clrTtSortBy": { "alias": "clrTtSortBy"; "required": false; "isSignal": true; }; "clrTtSortOrder": { "alias": "clrTtSortOrder"; "required": false; "isSignal": true; }; }, { "clrTtSortOrderChange": "clrTtSortOrderChange"; }, never, ["clr-tt-filter, clr-tt-string-filter", "*"], false, [{ directive: typeof i1.ClrPopoverHostDirective; inputs: {}; outputs: {}; }]>;
|
|
23
18
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ClrTreetableFilterInterface } from './interfaces/filter-model';
|
|
3
|
+
import { ClrCommonStringsService, ClrPopoverPosition } from '@clr/angular';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ClrTreetableFilter<T extends object> implements OnInit, OnDestroy {
|
|
6
|
+
protected readonly commonStringsService: ClrCommonStringsService;
|
|
7
|
+
private readonly smartToggleService;
|
|
8
|
+
private readonly filterProvider;
|
|
9
|
+
protected readonly smartPosition: ClrPopoverPosition;
|
|
10
|
+
clrTtFilter: import("@angular/core").InputSignal<ClrTreetableFilterInterface<T, unknown>>;
|
|
11
|
+
private readonly registered;
|
|
12
|
+
protected readonly open: import("@angular/core").Signal<boolean>;
|
|
13
|
+
protected readonly active: import("@angular/core").Signal<boolean>;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableFilter<any>, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableFilter<any>, "clr-tt-filter", never, { "clrTtFilter": { "alias": "clrTtFilter"; "required": true; "isSignal": true; }; }, {}, never, ["*"], false, never>;
|
|
18
|
+
}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClrTreetableChildrenFunction, ClrTreetableTreeNode } from './interfaces/treetable-model';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Context passed to a TreeTable item template.
|
|
5
|
+
*
|
|
6
|
+
* $implicit: The current data item.<br/>
|
|
7
|
+
* isLeaf: True if the node has no children.<br/>
|
|
8
|
+
* clrTtNode: Internal tree node metadata object.<br/>
|
|
9
|
+
*/
|
|
10
|
+
export type ClrTreetableItemsContext<T extends object> = {
|
|
11
|
+
$implicit: T;
|
|
12
|
+
isLeaf: boolean;
|
|
13
|
+
clrTtNode: ClrTreetableTreeNode<T>;
|
|
14
|
+
};
|
|
15
|
+
export declare class TreetableItemsDirective<T extends object> {
|
|
16
|
+
private readonly _dataStateService;
|
|
17
|
+
private readonly _recursionService;
|
|
18
|
+
private readonly _templateRef;
|
|
19
|
+
clrTtItemsOf: import("@angular/core").InputSignal<T[]>;
|
|
20
|
+
clrTtItemsGetChildren: import("@angular/core").InputSignal<ClrTreetableChildrenFunction<T>>;
|
|
15
21
|
constructor();
|
|
22
|
+
static ngTemplateContextGuard<C extends object>(dir: TreetableItemsDirective<C>, ctx: any): ctx is ClrTreetableItemsContext<C>;
|
|
16
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreetableItemsDirective<any>, never>;
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TreetableItemsDirective<any>, "[clrTtItems]", never, { "
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TreetableItemsDirective<any>, "[clrTtItems][clrTtItemsOf]", never, { "clrTtItemsOf": { "alias": "clrTtItemsOf"; "required": true; "isSignal": true; }; "clrTtItemsGetChildren": { "alias": "clrTtItemsGetChildren"; "required": true; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
18
25
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClrTreetableTreeNode } from './interfaces/treetable-model';
|
|
2
|
+
import { ClrTreetableItemsContext } from './treetable-items';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ClrTreetableRecursiveRows<T extends object> {
|
|
5
|
+
private readonly _recursionService;
|
|
6
|
+
readonly parent: import("@angular/core").InputSignal<ClrTreetableTreeNode<T>>;
|
|
7
|
+
readonly children: import("@angular/core").InputSignal<ClrTreetableTreeNode<T>[]>;
|
|
8
|
+
protected readonly template: import("@angular/core").Signal<import("@angular/core").TemplateRef<ClrTreetableItemsContext<any>>>;
|
|
9
|
+
protected getContext(node: ClrTreetableTreeNode<T>): ClrTreetableItemsContext<T>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableRecursiveRows<any>, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableRecursiveRows<any>, "clr-tt-recursive-rows", never, { "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ClrTreetableSelectedState } from './enums/selection-type';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ClrTreetableRowCheckbox {
|
|
4
|
+
clrTtSelectionState: import("@angular/core").ModelSignal<ClrTreetableSelectedState>;
|
|
5
|
+
protected isSelected: import("@angular/core").Signal<boolean>;
|
|
6
|
+
protected isIndeterminate: import("@angular/core").Signal<boolean>;
|
|
7
|
+
protected toggle(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableRowCheckbox, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableRowCheckbox, "clr-tt-row-checkbox", never, { "clrTtSelectionState": { "alias": "clrTtSelectionState"; "required": false; "isSignal": true; }; }, { "clrTtSelectionState": "clrTtSelectionStateChange"; }, never, never, false, never>;
|
|
10
|
+
}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Selection } from './providers';
|
|
4
|
-
import { SelectionType } from './enums/selection-type';
|
|
1
|
+
import { ClrTreetableSelectedState } from './enums/selection-type';
|
|
2
|
+
import { ClrTreetableTreeNode } from './interfaces/treetable-model';
|
|
5
3
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ClrTreetableRow<T
|
|
7
|
-
readonly
|
|
8
|
-
private readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onExpandCollapseClick(): void;
|
|
25
|
-
toggle(selected?: boolean): void;
|
|
4
|
+
export declare class ClrTreetableRow<T extends object> {
|
|
5
|
+
private readonly _recursionService;
|
|
6
|
+
private readonly _treetable;
|
|
7
|
+
clrExpanded: import("@angular/core").ModelSignal<boolean>;
|
|
8
|
+
clrExpandable: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
clrClickable: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
clrTtItem: import("@angular/core").InputSignal<ClrTreetableTreeNode<T>>;
|
|
11
|
+
private readonly _actionOverflow;
|
|
12
|
+
protected readonly shouldAnimate: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
+
protected readonly isRecursionMode: import("@angular/core").Signal<boolean>;
|
|
14
|
+
private readonly _isClickable;
|
|
15
|
+
protected readonly isSelected: import("@angular/core").Signal<boolean>;
|
|
16
|
+
protected readonly showActionOverflow: import("@angular/core").Signal<boolean>;
|
|
17
|
+
protected readonly showEmptyActionOverflow: import("@angular/core").Signal<boolean>;
|
|
18
|
+
protected readonly showClickClass: import("@angular/core").Signal<boolean>;
|
|
19
|
+
protected readonly showSelection: import("@angular/core").Signal<boolean>;
|
|
20
|
+
private onExpandCollapseClick;
|
|
21
|
+
protected toggleSelection(selectionState: ClrTreetableSelectedState): void;
|
|
26
22
|
private toggleExpand;
|
|
27
|
-
onRowClick(event: MouseEvent): void;
|
|
28
|
-
onCaretClick(): void;
|
|
29
|
-
get selected(): boolean | string;
|
|
30
|
-
set selected(value: boolean | string);
|
|
31
|
-
protected readonly SelectionType: typeof SelectionType;
|
|
23
|
+
protected onRowClick(event: MouseEvent): void;
|
|
24
|
+
protected onCaretClick(): void;
|
|
32
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableRow<any>, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableRow<any>, "clr-tt-row", never, { "
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetableRow<any>, "clr-tt-row", never, { "clrExpanded": { "alias": "clrExpanded"; "required": false; "isSignal": true; }; "clrExpandable": { "alias": "clrExpandable"; "required": false; "isSignal": true; }; "clrClickable": { "alias": "clrClickable"; "required": false; "isSignal": true; }; "clrTtItem": { "alias": "clrTtItem"; "required": false; "isSignal": true; }; }, { "clrExpanded": "clrExpandedChange"; }, ["_actionOverflow"], ["clr-tt-action-overflow", "clr-tt-cell", "clr-tt-row"], false, never>;
|
|
34
27
|
}
|
package/treetable/treetable.d.ts
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter, QueryList } from '@angular/core';
|
|
2
|
-
import { ClrTreetableRow } from './treetable-row';
|
|
3
1
|
import { SelectionType } from './enums/selection-type';
|
|
4
|
-
import {
|
|
5
|
-
import { TreetableItemsDirective } from './treetable-items';
|
|
2
|
+
import { ClrTreetableState } from './interfaces/treetable-state-model';
|
|
6
3
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ClrTreetable<T
|
|
8
|
-
readonly
|
|
9
|
-
private readonly
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
set allSelected(_: boolean);
|
|
29
|
-
protected readonly SelectionType: typeof SelectionType;
|
|
4
|
+
export declare class ClrTreetable<T extends object> {
|
|
5
|
+
private readonly _dataStateService;
|
|
6
|
+
private readonly _recursionService;
|
|
7
|
+
clrClickableRows: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
clrHideHeader: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
clrTtLoading: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
clrTtSelected: import("@angular/core").InputSignal<T[]>;
|
|
11
|
+
clrTtAutoParentSelection: import("@angular/core").InputSignal<boolean>;
|
|
12
|
+
clrTtSelectedChange: import("@angular/core").OutputRef<T[]>;
|
|
13
|
+
clrTtRefresh: import("@angular/core").OutputRef<ClrTreetableState<T, unknown>>;
|
|
14
|
+
private readonly _ttRows;
|
|
15
|
+
private readonly _actionOverflow;
|
|
16
|
+
protected readonly empty: import("@angular/core").Signal<boolean>;
|
|
17
|
+
protected readonly displayedNodes: import("@angular/core").Signal<import("@porscheinformatik/clr-addons").ClrTreetableTreeNode<T>[]>;
|
|
18
|
+
protected readonly isRecursionMode: import("@angular/core").Signal<boolean>;
|
|
19
|
+
readonly selectionType: import("@angular/core").Signal<SelectionType>;
|
|
20
|
+
readonly showSelection: import("@angular/core").Signal<boolean>;
|
|
21
|
+
readonly areAllRowsSelected: import("@angular/core").Signal<boolean>;
|
|
22
|
+
readonly hasActionOverflow: import("@angular/core").Signal<boolean>;
|
|
23
|
+
constructor();
|
|
24
|
+
toggleSelectAll(): void;
|
|
30
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetable<any>, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetable<any>, "clr-treetable", never, { "clrClickableRows": { "alias": "clrClickableRows"; "required": false; }; "
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrTreetable<any>, "clr-treetable", never, { "clrClickableRows": { "alias": "clrClickableRows"; "required": false; "isSignal": true; }; "clrHideHeader": { "alias": "clrHideHeader"; "required": false; "isSignal": true; }; "clrTtLoading": { "alias": "clrTtLoading"; "required": false; "isSignal": true; }; "clrTtSelected": { "alias": "clrTtSelected"; "required": false; "isSignal": true; }; "clrTtAutoParentSelection": { "alias": "clrTtAutoParentSelection"; "required": false; "isSignal": true; }; }, { "clrTtSelectedChange": "clrTtSelectedChange"; "clrTtRefresh": "clrTtRefresh"; }, ["_ttRows", "_actionOverflow"], ["clr-tt-column", "clr-tt-row", "clr-tt-placeholder"], false, never>;
|
|
32
27
|
}
|
|
@@ -10,11 +10,16 @@ import * as i8 from "./renderer/header-renderer";
|
|
|
10
10
|
import * as i9 from "./renderer/row-renderer";
|
|
11
11
|
import * as i10 from "./renderer/cell-renderer";
|
|
12
12
|
import * as i11 from "./treetable-items";
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "
|
|
13
|
+
import * as i12 from "./treetable-filter";
|
|
14
|
+
import * as i13 from "./built-in/filter/treetable-string-filter";
|
|
15
|
+
import * as i14 from "./treetable-recursive-rows";
|
|
16
|
+
import * as i15 from "./treetable-row-checkbox";
|
|
17
|
+
import * as i16 from "@angular/common";
|
|
18
|
+
import * as i17 from "@clr/angular";
|
|
19
|
+
import * as i18 from "@angular/forms";
|
|
16
20
|
export declare class ClrTreetableModule {
|
|
21
|
+
constructor();
|
|
17
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrTreetableModule, never>;
|
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ClrTreetableModule, [typeof i1.ClrTreetable, typeof i2.ClrTreetableRow, typeof i3.ClrTreetableCell, typeof i4.ClrTreetableColumn, typeof i5.ClrTreetablePlaceholder, typeof i6.ClrTreetableActionOverflow, typeof i7.TreetableMainRenderer, typeof i8.TreetableHeaderRenderer, typeof i9.TreetableRowRenderer, typeof i10.TreetableCellRenderer, typeof i11.TreetableItemsDirective], [typeof
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ClrTreetableModule, [typeof i1.ClrTreetable, typeof i2.ClrTreetableRow, typeof i3.ClrTreetableCell, typeof i4.ClrTreetableColumn, typeof i5.ClrTreetablePlaceholder, typeof i6.ClrTreetableActionOverflow, typeof i7.TreetableMainRenderer, typeof i8.TreetableHeaderRenderer, typeof i9.TreetableRowRenderer, typeof i10.TreetableCellRenderer, typeof i11.TreetableItemsDirective, typeof i12.ClrTreetableFilter, typeof i13.ClrTreetableStringFilter, typeof i14.ClrTreetableRecursiveRows, typeof i15.ClrTreetableRowCheckbox], [typeof i16.CommonModule, typeof i17.ClarityModule, typeof i18.ReactiveFormsModule, typeof i18.FormsModule], [typeof i1.ClrTreetable, typeof i2.ClrTreetableRow, typeof i3.ClrTreetableCell, typeof i4.ClrTreetableColumn, typeof i5.ClrTreetablePlaceholder, typeof i6.ClrTreetableActionOverflow, typeof i7.TreetableMainRenderer, typeof i8.TreetableHeaderRenderer, typeof i9.TreetableRowRenderer, typeof i10.TreetableCellRenderer, typeof i11.TreetableItemsDirective, typeof i12.ClrTreetableFilter, typeof i13.ClrTreetableStringFilter]>;
|
|
19
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<ClrTreetableModule>;
|
|
20
25
|
}
|