@swimlane/ngx-datatable 21.0.0 → 22.0.0-alpha.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/CHANGELOG.md +9 -0
- package/assets/app.css +0 -2
- package/fesm2022/swimlane-ngx-datatable.mjs +1174 -1684
- package/fesm2022/swimlane-ngx-datatable.mjs.map +1 -1
- package/index.css +1 -247
- package/index.d.ts +1678 -3
- package/index.scss +1 -319
- package/package.json +4 -4
- package/themes/bootstrap.css +5 -0
- package/themes/bootstrap.scss +7 -0
- package/themes/dark.css +5 -1
- package/themes/dark.scss +6 -1
- package/themes/material.css +5 -17
- package/themes/material.scss +6 -17
- package/lib/components/body/body-cell.component.d.ts +0 -73
- package/lib/components/body/body-group-header-template.directive.d.ts +0 -7
- package/lib/components/body/body-group-header.directive.d.ts +0 -34
- package/lib/components/body/body-row-def.component.d.ts +0 -34
- package/lib/components/body/body-row-wrapper.component.d.ts +0 -44
- package/lib/components/body/body-row.component.d.ts +0 -47
- package/lib/components/body/body.component.d.ts +0 -231
- package/lib/components/body/ghost-loader/ghost-loader.component.d.ts +0 -12
- package/lib/components/body/progress-bar.component.d.ts +0 -5
- package/lib/components/body/scroller.component.d.ts +0 -24
- package/lib/components/body/selection.component.d.ts +0 -28
- package/lib/components/body/summary/summary-row.component.d.ts +0 -24
- package/lib/components/columns/column-cell.directive.d.ts +0 -9
- package/lib/components/columns/column-ghost-cell.directive.d.ts +0 -6
- package/lib/components/columns/column-header.directive.d.ts +0 -7
- package/lib/components/columns/column.directive.d.ts +0 -68
- package/lib/components/columns/tree.directive.d.ts +0 -7
- package/lib/components/datatable.component.d.ts +0 -591
- package/lib/components/footer/footer-template.directive.d.ts +0 -7
- package/lib/components/footer/footer.component.d.ts +0 -23
- package/lib/components/footer/footer.directive.d.ts +0 -18
- package/lib/components/footer/pager.component.d.ts +0 -30
- package/lib/components/header/header-cell.component.d.ts +0 -52
- package/lib/components/header/header.component.d.ts +0 -75
- package/lib/components/row-detail/row-detail-template.directive.d.ts +0 -7
- package/lib/components/row-detail/row-detail.directive.d.ts +0 -31
- package/lib/directives/disable-row.directive.d.ts +0 -22
- package/lib/directives/draggable.directive.d.ts +0 -38
- package/lib/directives/long-press.directive.d.ts +0 -39
- package/lib/directives/orderable.directive.d.ts +0 -34
- package/lib/directives/resizeable.directive.d.ts +0 -25
- package/lib/directives/visibility.directive.d.ts +0 -26
- package/lib/ngx-datatable.module.d.ts +0 -50
- package/lib/services/column-changes.service.d.ts +0 -13
- package/lib/services/scrollbar-helper.service.d.ts +0 -12
- package/lib/types/internal.types.d.ts +0 -31
- package/lib/types/public.types.d.ts +0 -142
- package/lib/types/table-column.type.d.ts +0 -163
- package/lib/utils/camel-case.d.ts +0 -10
- package/lib/utils/column-helper.d.ts +0 -11
- package/lib/utils/column-prop-getters.d.ts +0 -29
- package/lib/utils/column.d.ts +0 -19
- package/lib/utils/id.d.ts +0 -5
- package/lib/utils/keys.d.ts +0 -8
- package/lib/utils/math.d.ts +0 -30
- package/lib/utils/row-height-cache.d.ts +0 -52
- package/lib/utils/selection.d.ts +0 -2
- package/lib/utils/sort.d.ts +0 -17
- package/lib/utils/table-token.d.ts +0 -7
- package/lib/utils/throttle.d.ts +0 -17
- package/lib/utils/tree.d.ts +0 -40
- package/public-api.d.ts +0 -48
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { PipeTransform, TemplateRef } from '@angular/core';
|
|
2
|
-
import { ValueGetter } from '../utils/column-prop-getters';
|
|
3
|
-
import { CellContext, HeaderCellContext } from './public.types';
|
|
4
|
-
/**
|
|
5
|
-
* Column property that indicates how to retrieve this column's
|
|
6
|
-
* value from a row.
|
|
7
|
-
* 'a.deep.value', 'normalprop', 0 (numeric)
|
|
8
|
-
*/
|
|
9
|
-
export type TableColumnProp = string | number;
|
|
10
|
-
/**
|
|
11
|
-
* Column Type
|
|
12
|
-
*/
|
|
13
|
-
export interface TableColumn<TRow = any> {
|
|
14
|
-
/**
|
|
15
|
-
* Internal unique id
|
|
16
|
-
*/
|
|
17
|
-
$$id?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Internal for column width distributions
|
|
20
|
-
*/
|
|
21
|
-
$$oldWidth?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Internal for setColumnDefaults
|
|
24
|
-
*/
|
|
25
|
-
$$valueGetter?: ValueGetter;
|
|
26
|
-
/**
|
|
27
|
-
* Determines if column is checkbox
|
|
28
|
-
*/
|
|
29
|
-
checkboxable?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Determines if the column is frozen to the left
|
|
32
|
-
*/
|
|
33
|
-
frozenLeft?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Determines if the column is frozen to the right
|
|
36
|
-
*/
|
|
37
|
-
frozenRight?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* The grow factor relative to other columns. Same as the flex-grow
|
|
40
|
-
* API from http =//www.w3.org/TR/css3-flexbox/. Basically;
|
|
41
|
-
* take any available extra width and distribute it proportionally
|
|
42
|
-
* according to all columns' flexGrow values.
|
|
43
|
-
*/
|
|
44
|
-
flexGrow?: number;
|
|
45
|
-
/**
|
|
46
|
-
* Min width of the column
|
|
47
|
-
*/
|
|
48
|
-
minWidth?: number;
|
|
49
|
-
/**
|
|
50
|
-
* Max width of the column
|
|
51
|
-
*/
|
|
52
|
-
maxWidth?: number;
|
|
53
|
-
/**
|
|
54
|
-
* The default width of the column, in pixels
|
|
55
|
-
*/
|
|
56
|
-
width?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Can the column be resized
|
|
59
|
-
*/
|
|
60
|
-
resizeable?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Custom sort comparator
|
|
63
|
-
*/
|
|
64
|
-
comparator?: any;
|
|
65
|
-
/**
|
|
66
|
-
* Custom pipe transforms
|
|
67
|
-
*/
|
|
68
|
-
pipe?: PipeTransform;
|
|
69
|
-
/**
|
|
70
|
-
* Can the column be sorted
|
|
71
|
-
*/
|
|
72
|
-
sortable?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Can the column be re-arranged by dragging
|
|
75
|
-
*/
|
|
76
|
-
draggable?: boolean;
|
|
77
|
-
/** @internal */
|
|
78
|
-
dragging?: boolean;
|
|
79
|
-
/** @internal */
|
|
80
|
-
isTarget?: boolean;
|
|
81
|
-
/** @internal */
|
|
82
|
-
targetMarkerContext?: any;
|
|
83
|
-
/**
|
|
84
|
-
* Whether the column can automatically resize to fill space in the table.
|
|
85
|
-
*/
|
|
86
|
-
canAutoResize?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Column name or label
|
|
89
|
-
*/
|
|
90
|
-
name?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Property to bind to the row. Example:
|
|
93
|
-
*
|
|
94
|
-
* `someField` or `some.field.nested`, 0 (numeric)
|
|
95
|
-
*
|
|
96
|
-
* If left blank, will use the name as camel case conversion
|
|
97
|
-
*/
|
|
98
|
-
prop?: TableColumnProp;
|
|
99
|
-
/**
|
|
100
|
-
* By default, the property is bound using normal data binding `<span>{{content}}</span>`.
|
|
101
|
-
* If this property is set to true, the property will be bound as `<span [innerHTML]="content" />`.
|
|
102
|
-
*
|
|
103
|
-
* **DANGER** If enabling this feature, make sure the source of the data is trusted. This can be a vector for HTML injection attacks.
|
|
104
|
-
*/
|
|
105
|
-
bindAsUnsafeHtml?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Cell template ref
|
|
108
|
-
*/
|
|
109
|
-
cellTemplate?: TemplateRef<CellContext<TRow>>;
|
|
110
|
-
/**
|
|
111
|
-
* Ghost Cell template ref
|
|
112
|
-
*/
|
|
113
|
-
ghostCellTemplate?: TemplateRef<any>;
|
|
114
|
-
/**
|
|
115
|
-
* Header template ref
|
|
116
|
-
*/
|
|
117
|
-
headerTemplate?: TemplateRef<HeaderCellContext>;
|
|
118
|
-
/**
|
|
119
|
-
* Tree toggle template ref
|
|
120
|
-
*/
|
|
121
|
-
treeToggleTemplate?: any;
|
|
122
|
-
/**
|
|
123
|
-
* CSS Classes for the cell
|
|
124
|
-
*/
|
|
125
|
-
cellClass?: string | ((data: {
|
|
126
|
-
row: TRow;
|
|
127
|
-
group?: TRow[];
|
|
128
|
-
column: TableColumn<TRow>;
|
|
129
|
-
value: any;
|
|
130
|
-
rowHeight: number;
|
|
131
|
-
}) => string | Record<string, boolean>);
|
|
132
|
-
/**
|
|
133
|
-
* CSS classes for the header
|
|
134
|
-
*/
|
|
135
|
-
headerClass?: string | ((data: {
|
|
136
|
-
column: TableColumn;
|
|
137
|
-
}) => string | Record<string, boolean>);
|
|
138
|
-
/**
|
|
139
|
-
* Header checkbox enabled
|
|
140
|
-
*/
|
|
141
|
-
headerCheckboxable?: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* Is tree displayed on this column
|
|
144
|
-
*/
|
|
145
|
-
isTreeColumn?: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* Width of the tree level indent
|
|
148
|
-
*/
|
|
149
|
-
treeLevelIndent?: number;
|
|
150
|
-
/**
|
|
151
|
-
* Summary function
|
|
152
|
-
*/
|
|
153
|
-
summaryFunc?: (cells: any[]) => any;
|
|
154
|
-
/**
|
|
155
|
-
* Summary cell template ref
|
|
156
|
-
*/
|
|
157
|
-
summaryTemplate?: TemplateRef<any>;
|
|
158
|
-
}
|
|
159
|
-
export interface TableColumnGroup {
|
|
160
|
-
left: TableColumn[];
|
|
161
|
-
center: TableColumn[];
|
|
162
|
-
right: TableColumn[];
|
|
163
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts strings from something to camel case
|
|
3
|
-
* http://stackoverflow.com/questions/10425287/convert-dash-separated-string-to-camelcase
|
|
4
|
-
*/
|
|
5
|
-
export declare function camelCase(str: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Converts strings from camel case to words
|
|
8
|
-
* http://stackoverflow.com/questions/7225407/convert-camelcasetext-to-camel-case-text
|
|
9
|
-
*/
|
|
10
|
-
export declare function deCamelCase(str: string): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TableColumn } from '../types/table-column.type';
|
|
2
|
-
import { DataTableColumnDirective } from '../components/columns/column.directive';
|
|
3
|
-
/**
|
|
4
|
-
* Sets the column defaults
|
|
5
|
-
*/
|
|
6
|
-
export declare function setColumnDefaults(columns: TableColumn[], defaultColumnWidth?: number): void;
|
|
7
|
-
export declare function isNullOrUndefined<T>(value: T | null | undefined): value is null | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Translates templates definitions to objects
|
|
10
|
-
*/
|
|
11
|
-
export declare function translateTemplates<TRow>(templates: DataTableColumnDirective<TRow>[]): TableColumn[];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { TableColumnProp } from '../types/table-column.type';
|
|
2
|
-
export type ValueGetter = (obj: any, prop: TableColumnProp) => any;
|
|
3
|
-
/**
|
|
4
|
-
* Always returns the empty string ''
|
|
5
|
-
*/
|
|
6
|
-
export declare function emptyStringGetter(): string;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the appropriate getter function for this kind of prop.
|
|
9
|
-
* If prop == null, returns the emptyStringGetter.
|
|
10
|
-
*/
|
|
11
|
-
export declare function getterForProp(prop: TableColumnProp): ValueGetter;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the value at this numeric index.
|
|
14
|
-
* @param row array of values
|
|
15
|
-
* @param index numeric index
|
|
16
|
-
* @returns any or '' if invalid index
|
|
17
|
-
*/
|
|
18
|
-
export declare function numericIndexGetter(row: any[], index: number): any;
|
|
19
|
-
/**
|
|
20
|
-
* Returns the value of a field.
|
|
21
|
-
* (more efficient than deepValueGetter)
|
|
22
|
-
* @param obj object containing the field
|
|
23
|
-
* @param fieldName field name string
|
|
24
|
-
*/
|
|
25
|
-
export declare function shallowValueGetter(obj: any, fieldName: string): any;
|
|
26
|
-
/**
|
|
27
|
-
* Returns a deep object given a string. zoo['animal.type']
|
|
28
|
-
*/
|
|
29
|
-
export declare function deepValueGetter(obj: any, path: string): any;
|
package/lib/utils/column.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TableColumn, TableColumnGroup } from '../types/table-column.type';
|
|
2
|
-
import { ColumnGroupWidth, PinnedColumns } from '../types/internal.types';
|
|
3
|
-
/**
|
|
4
|
-
* Returns the columns by pin.
|
|
5
|
-
*/
|
|
6
|
-
export declare function columnsByPin(cols: TableColumn[]): TableColumnGroup;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the widths of all group sets of a column
|
|
9
|
-
*/
|
|
10
|
-
export declare function columnGroupWidths(groups: TableColumnGroup, all: TableColumn[]): ColumnGroupWidth;
|
|
11
|
-
/**
|
|
12
|
-
* Calculates the total width of all columns and their groups
|
|
13
|
-
*/
|
|
14
|
-
export declare function columnTotalWidth(columns: TableColumn[], prop?: string): number;
|
|
15
|
-
/**
|
|
16
|
-
* Calculates the total width of all columns and their groups
|
|
17
|
-
*/
|
|
18
|
-
export declare function columnsTotalWidth(columns: TableColumn[], prop?: keyof TableColumn): number;
|
|
19
|
-
export declare function columnsByPinArr(val: TableColumn[]): PinnedColumns[];
|
package/lib/utils/id.d.ts
DELETED
package/lib/utils/keys.d.ts
DELETED
package/lib/utils/math.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { TableColumn } from '../types/table-column.type';
|
|
2
|
-
/**
|
|
3
|
-
* Calculates the Total Flex Grow
|
|
4
|
-
*/
|
|
5
|
-
export declare function getTotalFlexGrow(columns: TableColumn[]): number;
|
|
6
|
-
/**
|
|
7
|
-
* Adjusts the column widths.
|
|
8
|
-
* Inspired by: https://github.com/facebook/fixed-data-table/blob/master/src/FixedDataTableWidthHelper.js
|
|
9
|
-
*/
|
|
10
|
-
export declare function adjustColumnWidths(allColumns: TableColumn[], expectedWidth: number): void;
|
|
11
|
-
/**
|
|
12
|
-
* Forces the width of the columns to
|
|
13
|
-
* distribute equally but overflowing when necessary
|
|
14
|
-
*
|
|
15
|
-
* Rules:
|
|
16
|
-
*
|
|
17
|
-
* - If combined withs are less than the total width of the grid,
|
|
18
|
-
* proportion the widths given the min / max / normal widths to fill the width.
|
|
19
|
-
*
|
|
20
|
-
* - If the combined widths, exceed the total width of the grid,
|
|
21
|
-
* use the standard widths.
|
|
22
|
-
*
|
|
23
|
-
* - If a column is resized, it should always use that width
|
|
24
|
-
*
|
|
25
|
-
* - The proportional widths should never fall below min size if specified.
|
|
26
|
-
*
|
|
27
|
-
* - If the grid starts off small but then becomes greater than the size ( + / - )
|
|
28
|
-
* the width should use the original width; not the newly proportioned widths.
|
|
29
|
-
*/
|
|
30
|
-
export declare function forceFillColumnWidths(allColumns: TableColumn[], expectedWidth: number, startIdx: number, allowBleed: boolean, defaultColWidth?: number, verticalScrollWidth?: number): void;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This object contains the cache of the various row heights that are present inside
|
|
3
|
-
* the data table. Its based on Fenwick tree data structure that helps with
|
|
4
|
-
* querying sums that have time complexity of log n.
|
|
5
|
-
*
|
|
6
|
-
* Fenwick Tree Credits: http://petr-mitrichev.blogspot.com/2013/05/fenwick-tree-range-updates.html
|
|
7
|
-
* https://github.com/mikolalysenko/fenwick-tree
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare class RowHeightCache {
|
|
11
|
-
/**
|
|
12
|
-
* Tree Array stores the cumulative information of the row heights to perform efficient
|
|
13
|
-
* range queries and updates. Currently the tree is initialized to the base row
|
|
14
|
-
* height instead of the detail row height.
|
|
15
|
-
*/
|
|
16
|
-
private treeArray;
|
|
17
|
-
/**
|
|
18
|
-
* Clear the Tree array.
|
|
19
|
-
*/
|
|
20
|
-
clearCache(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Initialize the Fenwick tree with row Heights.
|
|
23
|
-
*
|
|
24
|
-
* @param rows The array of rows which contain the expanded status.
|
|
25
|
-
* @param rowHeight The row height.
|
|
26
|
-
* @param detailRowHeight The detail row height.
|
|
27
|
-
*/
|
|
28
|
-
initCache(details: any): void;
|
|
29
|
-
/**
|
|
30
|
-
* Given the ScrollY position i.e. sum, provide the rowIndex
|
|
31
|
-
* that is present in the current view port. Below handles edge cases.
|
|
32
|
-
*/
|
|
33
|
-
getRowIndex(scrollY: number): number;
|
|
34
|
-
/**
|
|
35
|
-
* When a row is expanded or rowHeight is changed, update the height. This can
|
|
36
|
-
* be utilized in future when Angular Data table supports dynamic row heights.
|
|
37
|
-
*/
|
|
38
|
-
update(atRowIndex: number, byRowHeight: number): void;
|
|
39
|
-
/**
|
|
40
|
-
* Range Sum query from 1 to the rowIndex
|
|
41
|
-
*/
|
|
42
|
-
query(atIndex: number): number;
|
|
43
|
-
/**
|
|
44
|
-
* Find the total height between 2 row indexes
|
|
45
|
-
*/
|
|
46
|
-
queryBetween(atIndexA: number, atIndexB: number): number;
|
|
47
|
-
/**
|
|
48
|
-
* Given the ScrollY position i.e. sum, provide the rowIndex
|
|
49
|
-
* that is present in the current view port.
|
|
50
|
-
*/
|
|
51
|
-
private calcRowIndex;
|
|
52
|
-
}
|
package/lib/utils/selection.d.ts
DELETED
package/lib/utils/sort.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Group, SortDirection, SortPropDir, SortType } from '../types/public.types';
|
|
2
|
-
import { TableColumn } from '../types/table-column.type';
|
|
3
|
-
/**
|
|
4
|
-
* Gets the next sort direction
|
|
5
|
-
*/
|
|
6
|
-
export declare function nextSortDir(sortType: SortType, current: SortDirection | 'desc' | 'asc'): SortDirection | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Adapted from fueld-ui on 6/216
|
|
9
|
-
* https://github.com/FuelInteractive/fuel-ui/tree/master/src/pipes/OrderBy
|
|
10
|
-
*/
|
|
11
|
-
export declare function orderByComparator(a: any, b: any): number;
|
|
12
|
-
/**
|
|
13
|
-
* creates a shallow copy of the `rows` input and returns the sorted copy. this function
|
|
14
|
-
* does not sort the `rows` argument in place
|
|
15
|
-
*/
|
|
16
|
-
export declare function sortRows<TRow>(rows: TRow[], columns: TableColumn[], dirs: SortPropDir[]): TRow[];
|
|
17
|
-
export declare function sortGroupedRows<TRow>(groupedRows: Group<TRow>[], columns: TableColumn[], dirs: SortPropDir[], sortOnGroupHeader: SortPropDir): Group<TRow>[];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import type { DatatableComponent } from '../components/datatable.component';
|
|
3
|
-
/**
|
|
4
|
-
* This token is created to break cycling import error which occurs when we import
|
|
5
|
-
* DatatableComponent in DataTableRowWrapperComponent.
|
|
6
|
-
*/
|
|
7
|
-
export declare const DatatableComponentToken: InjectionToken<DatatableComponent<any>>;
|
package/lib/utils/throttle.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Throttle a function
|
|
3
|
-
*/
|
|
4
|
-
export declare function throttle(func: any, wait: number, options?: any): (this: any) => any;
|
|
5
|
-
/**
|
|
6
|
-
* Throttle decorator
|
|
7
|
-
*
|
|
8
|
-
* class MyClass {
|
|
9
|
-
* throttleable(10)
|
|
10
|
-
* myFn() { ... }
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export declare function throttleable(duration: number, options?: any): (target: any, key: PropertyKey, descriptor: PropertyDescriptor) => {
|
|
14
|
-
configurable: boolean;
|
|
15
|
-
enumerable: boolean;
|
|
16
|
-
get: () => any;
|
|
17
|
-
};
|
package/lib/utils/tree.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { TableColumnProp } from '../types/table-column.type';
|
|
2
|
-
export type OptionalValueGetter = (row: any) => any | undefined;
|
|
3
|
-
export declare function optionalGetterForProp(prop: TableColumnProp): OptionalValueGetter;
|
|
4
|
-
/**
|
|
5
|
-
* This functions rearrange items by their parents
|
|
6
|
-
* Also sets the level value to each of the items
|
|
7
|
-
*
|
|
8
|
-
* Note: Expecting each item has a property called parentId
|
|
9
|
-
* Note: This algorithm will fail if a list has two or more items with same ID
|
|
10
|
-
* NOTE: This algorithm will fail if there is a deadlock of relationship
|
|
11
|
-
*
|
|
12
|
-
* For example,
|
|
13
|
-
*
|
|
14
|
-
* Input
|
|
15
|
-
*
|
|
16
|
-
* id -> parent
|
|
17
|
-
* 1 -> 0
|
|
18
|
-
* 2 -> 0
|
|
19
|
-
* 3 -> 1
|
|
20
|
-
* 4 -> 1
|
|
21
|
-
* 5 -> 2
|
|
22
|
-
* 7 -> 8
|
|
23
|
-
* 6 -> 3
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* Output
|
|
27
|
-
* id -> level
|
|
28
|
-
* 1 -> 0
|
|
29
|
-
* --3 -> 1
|
|
30
|
-
* ----6 -> 2
|
|
31
|
-
* --4 -> 1
|
|
32
|
-
* 2 -> 0
|
|
33
|
-
* --5 -> 1
|
|
34
|
-
* 7 -> 8
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @param rows
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
export declare function groupRowsByParents<TRow>(rows: TRow[], from?: OptionalValueGetter, to?: OptionalValueGetter): TRow[];
|
package/public-api.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export * from './lib/ngx-datatable.module';
|
|
2
|
-
export * from './lib/components/datatable.component';
|
|
3
|
-
export * from './lib/components/header/header.component';
|
|
4
|
-
export * from './lib/components/header/header-cell.component';
|
|
5
|
-
export * from './lib/components/body/body.component';
|
|
6
|
-
export * from './lib/components/body/body-cell.component';
|
|
7
|
-
export * from './lib/components/body/body-row.component';
|
|
8
|
-
export * from './lib/components/body/progress-bar.component';
|
|
9
|
-
export * from './lib/components/body/scroller.component';
|
|
10
|
-
export * from './lib/components/body/body-row-wrapper.component';
|
|
11
|
-
export * from './lib/components/body/selection.component';
|
|
12
|
-
export * from './lib/components/body/body-group-header.directive';
|
|
13
|
-
export * from './lib/components/body/body-group-header-template.directive';
|
|
14
|
-
export * from './lib/components/body/summary/summary-row.component';
|
|
15
|
-
export * from './lib/components/footer/footer.component';
|
|
16
|
-
export * from './lib/components/footer/pager.component';
|
|
17
|
-
export * from './lib/components/footer/footer.directive';
|
|
18
|
-
export * from './lib/components/footer/footer-template.directive';
|
|
19
|
-
export * from './lib/components/columns/column.directive';
|
|
20
|
-
export * from './lib/components/columns/column-header.directive';
|
|
21
|
-
export * from './lib/components/columns/column-cell.directive';
|
|
22
|
-
export * from './lib/components/columns/column-ghost-cell.directive';
|
|
23
|
-
export * from './lib/components/columns/tree.directive';
|
|
24
|
-
export * from './lib/components/row-detail/row-detail.directive';
|
|
25
|
-
export * from './lib/components/row-detail/row-detail-template.directive';
|
|
26
|
-
export * from './lib/components/body/body-row-def.component';
|
|
27
|
-
export * from './lib/directives/draggable.directive';
|
|
28
|
-
export * from './lib/directives/long-press.directive';
|
|
29
|
-
export * from './lib/directives/orderable.directive';
|
|
30
|
-
export * from './lib/directives/resizeable.directive';
|
|
31
|
-
export * from './lib/directives/visibility.directive';
|
|
32
|
-
export * from './lib/directives/disable-row.directive';
|
|
33
|
-
export * from './lib/services/scrollbar-helper.service';
|
|
34
|
-
export * from './lib/services/column-changes.service';
|
|
35
|
-
export * from './lib/types/public.types';
|
|
36
|
-
export * from './lib/types/table-column.type';
|
|
37
|
-
export * from './lib/utils/id';
|
|
38
|
-
export * from './lib/utils/column';
|
|
39
|
-
export * from './lib/utils/column-prop-getters';
|
|
40
|
-
export * from './lib/utils/camel-case';
|
|
41
|
-
export * from './lib/utils/keys';
|
|
42
|
-
export * from './lib/utils/math';
|
|
43
|
-
export * from './lib/utils/selection';
|
|
44
|
-
export * from './lib/utils/throttle';
|
|
45
|
-
export * from './lib/utils/sort';
|
|
46
|
-
export * from './lib/utils/row-height-cache';
|
|
47
|
-
export * from './lib/utils/column-helper';
|
|
48
|
-
export * from './lib/utils/tree';
|