@swimlane/ngx-datatable 20.1.0 → 21.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/{fesm2020 → fesm2022}/swimlane-ngx-datatable.mjs +3404 -2536
- package/fesm2022/swimlane-ngx-datatable.mjs.map +1 -0
- package/lib/components/body/body-cell.component.d.ts +28 -23
- package/lib/components/body/body-group-header-template.directive.d.ts +3 -4
- package/lib/components/body/body-group-header.directive.d.ts +14 -9
- package/lib/components/body/body-row-def.component.d.ts +34 -0
- package/lib/components/body/body-row-wrapper.component.d.ts +34 -22
- package/lib/components/body/body-row.component.d.ts +28 -34
- package/lib/components/body/body.component.d.ts +88 -69
- package/lib/components/body/ghost-loader/ghost-loader.component.d.ts +12 -0
- package/lib/components/body/progress-bar.component.d.ts +1 -1
- package/lib/components/body/scroller.component.d.ts +4 -7
- package/lib/components/body/selection.component.d.ts +21 -25
- package/lib/components/body/summary/summary-row.component.d.ts +4 -3
- package/lib/components/columns/column-cell.directive.d.ts +4 -3
- package/lib/components/columns/column-ghost-cell.directive.d.ts +6 -0
- package/lib/components/columns/column-header.directive.d.ts +3 -4
- package/lib/components/columns/column.directive.d.ts +43 -18
- package/lib/components/columns/tree.directive.d.ts +1 -2
- package/lib/components/datatable.component.d.ts +142 -76
- package/lib/components/footer/footer-template.directive.d.ts +3 -4
- package/lib/components/footer/footer.component.d.ts +3 -2
- package/lib/components/footer/footer.directive.d.ts +6 -4
- package/lib/components/footer/pager.component.d.ts +6 -4
- package/lib/components/header/header-cell.component.d.ts +18 -18
- package/lib/components/header/header.component.d.ts +41 -36
- package/lib/components/row-detail/row-detail-template.directive.d.ts +3 -4
- package/lib/components/row-detail/row-detail.directive.d.ts +9 -8
- package/lib/directives/disable-row.directive.d.ts +22 -0
- package/lib/directives/draggable.directive.d.ts +11 -8
- package/lib/directives/long-press.directive.d.ts +16 -5
- package/lib/directives/orderable.directive.d.ts +21 -10
- package/lib/directives/resizeable.directive.d.ts +7 -5
- package/lib/directives/visibility.directive.d.ts +2 -3
- package/lib/ngx-datatable.module.d.ts +29 -30
- package/lib/services/scrollbar-helper.service.d.ts +0 -1
- package/lib/types/internal.types.d.ts +31 -0
- package/lib/types/public.types.d.ts +142 -0
- package/lib/types/table-column.type.d.ts +39 -66
- package/lib/utils/column-helper.d.ts +2 -2
- package/lib/utils/column-prop-getters.d.ts +1 -1
- package/lib/utils/column.d.ts +7 -14
- package/lib/utils/keys.d.ts +6 -6
- package/lib/utils/math.d.ts +4 -3
- package/lib/utils/selection.d.ts +2 -2
- package/lib/utils/sort.d.ts +5 -5
- package/lib/utils/table-token.d.ts +7 -0
- package/lib/utils/tree.d.ts +2 -2
- package/package.json +9 -17
- package/public-api.d.ts +4 -11
- package/LICENSE +0 -22
- package/README.md +0 -47
- package/assets/app.css +0 -302
- package/assets/data/100k.json +0 -100002
- package/assets/data/company.json +0 -505
- package/assets/data/company_tree.json +0 -61
- package/assets/data/forRowGrouping.json +0 -227
- package/assets/fonts/data-table.eot +0 -0
- package/assets/fonts/data-table.svg +0 -26
- package/assets/fonts/data-table.ttf +0 -0
- package/assets/fonts/data-table.woff +0 -0
- package/assets/icons-reference.html +0 -395
- package/assets/icons.css +0 -105
- package/esm2020/lib/components/body/body-cell.component.mjs +0 -432
- package/esm2020/lib/components/body/body-group-header-template.directive.mjs +0 -16
- package/esm2020/lib/components/body/body-group-header.directive.mjs +0 -62
- package/esm2020/lib/components/body/body-row-wrapper.component.mjs +0 -140
- package/esm2020/lib/components/body/body-row.component.mjs +0 -262
- package/esm2020/lib/components/body/body.component.mjs +0 -863
- package/esm2020/lib/components/body/progress-bar.component.mjs +0 -27
- package/esm2020/lib/components/body/scroller.component.mjs +0 -91
- package/esm2020/lib/components/body/selection.component.mjs +0 -150
- package/esm2020/lib/components/body/summary/summary-row.component.mjs +0 -105
- package/esm2020/lib/components/columns/column-cell.directive.mjs +0 -14
- package/esm2020/lib/components/columns/column-header.directive.mjs +0 -14
- package/esm2020/lib/components/columns/column.directive.mjs +0 -98
- package/esm2020/lib/components/columns/tree.directive.mjs +0 -14
- package/esm2020/lib/components/datatable.component.mjs +0 -1008
- package/esm2020/lib/components/footer/footer-template.directive.mjs +0 -14
- package/esm2020/lib/components/footer/footer.component.mjs +0 -128
- package/esm2020/lib/components/footer/footer.directive.mjs +0 -35
- package/esm2020/lib/components/footer/pager.component.mjs +0 -181
- package/esm2020/lib/components/header/header-cell.component.mjs +0 -243
- package/esm2020/lib/components/header/header.component.mjs +0 -376
- package/esm2020/lib/components/row-detail/row-detail-template.directive.mjs +0 -16
- package/esm2020/lib/components/row-detail/row-detail.directive.mjs +0 -63
- package/esm2020/lib/directives/draggable.directive.mjs +0 -108
- package/esm2020/lib/directives/long-press.directive.mjs +0 -117
- package/esm2020/lib/directives/orderable.directive.mjs +0 -136
- package/esm2020/lib/directives/resizeable.directive.mjs +0 -93
- package/esm2020/lib/directives/visibility.directive.mjs +0 -63
- package/esm2020/lib/events.mjs +0 -7
- package/esm2020/lib/ngx-datatable.module.mjs +0 -139
- package/esm2020/lib/services/column-changes.service.mjs +0 -24
- package/esm2020/lib/services/dimensions-helper.service.mjs +0 -17
- package/esm2020/lib/services/scrollbar-helper.service.mjs +0 -37
- package/esm2020/lib/types/click.type.mjs +0 -6
- package/esm2020/lib/types/column-mode.type.mjs +0 -7
- package/esm2020/lib/types/contextmenu.type.mjs +0 -6
- package/esm2020/lib/types/selection.type.mjs +0 -9
- package/esm2020/lib/types/sort-direction.type.mjs +0 -6
- package/esm2020/lib/types/sort-prop-dir.type.mjs +0 -2
- package/esm2020/lib/types/sort.type.mjs +0 -6
- package/esm2020/lib/types/table-column.type.mjs +0 -2
- package/esm2020/lib/utils/camel-case.mjs +0 -28
- package/esm2020/lib/utils/column-helper.mjs +0 -95
- package/esm2020/lib/utils/column-prop-getters.mjs +0 -96
- package/esm2020/lib/utils/column.mjs +0 -69
- package/esm2020/lib/utils/elm-from-point.mjs +0 -38
- package/esm2020/lib/utils/id.mjs +0 -8
- package/esm2020/lib/utils/keys.mjs +0 -10
- package/esm2020/lib/utils/math.mjs +0 -146
- package/esm2020/lib/utils/prefixes.mjs +0 -38
- package/esm2020/lib/utils/row-height-cache.mjs +0 -138
- package/esm2020/lib/utils/selection.mjs +0 -40
- package/esm2020/lib/utils/sort.mjs +0 -127
- package/esm2020/lib/utils/throttle.mjs +0 -60
- package/esm2020/lib/utils/translate.mjs +0 -25
- package/esm2020/lib/utils/tree.mjs +0 -103
- package/esm2020/public-api.mjs +0 -64
- package/esm2020/swimlane-ngx-datatable.mjs +0 -5
- package/fesm2015/swimlane-ngx-datatable.mjs +0 -5979
- package/fesm2015/swimlane-ngx-datatable.mjs.map +0 -1
- package/fesm2020/swimlane-ngx-datatable.mjs.map +0 -1
- package/index.css +0 -198
- package/index.scss +0 -315
- package/lib/events.d.ts +0 -3
- package/lib/services/dimensions-helper.service.d.ts +0 -10
- package/lib/types/click.type.d.ts +0 -4
- package/lib/types/column-mode.type.d.ts +0 -5
- package/lib/types/contextmenu.type.d.ts +0 -4
- package/lib/types/selection.type.d.ts +0 -7
- package/lib/types/sort-direction.type.d.ts +0 -4
- package/lib/types/sort-prop-dir.type.d.ts +0 -6
- package/lib/types/sort.type.d.ts +0 -4
- package/lib/utils/elm-from-point.d.ts +0 -8
- package/lib/utils/prefixes.d.ts +0 -1
- package/lib/utils/translate.d.ts +0 -1
- package/themes/bootstrap.css +0 -67
- package/themes/bootstrap.scss +0 -101
- package/themes/dark.css +0 -75
- package/themes/dark.scss +0 -120
- package/themes/material.css +0 -305
- package/themes/material.scss +0 -480
- /package/{swimlane-ngx-datatable.d.ts → index.d.ts} +0 -0
|
@@ -1,49 +1,38 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
1
|
+
import { PipeTransform, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ValueGetter } from '../utils/column-prop-getters';
|
|
3
|
+
import { CellContext, HeaderCellContext } from './public.types';
|
|
3
4
|
/**
|
|
4
5
|
* Column property that indicates how to retrieve this column's
|
|
5
6
|
* value from a row.
|
|
6
7
|
* 'a.deep.value', 'normalprop', 0 (numeric)
|
|
7
8
|
*/
|
|
8
|
-
export
|
|
9
|
+
export type TableColumnProp = string | number;
|
|
9
10
|
/**
|
|
10
11
|
* Column Type
|
|
11
12
|
*/
|
|
12
|
-
export interface TableColumn {
|
|
13
|
+
export interface TableColumn<TRow = any> {
|
|
13
14
|
/**
|
|
14
15
|
* Internal unique id
|
|
15
|
-
*
|
|
16
|
-
* @memberOf TableColumn
|
|
17
16
|
*/
|
|
18
17
|
$$id?: string;
|
|
19
18
|
/**
|
|
20
19
|
* Internal for column width distributions
|
|
21
|
-
*
|
|
22
|
-
* @memberOf TableColumn
|
|
23
20
|
*/
|
|
24
21
|
$$oldWidth?: number;
|
|
25
22
|
/**
|
|
26
23
|
* Internal for setColumnDefaults
|
|
27
|
-
*
|
|
28
|
-
* @memberOf TableColumn
|
|
29
24
|
*/
|
|
30
25
|
$$valueGetter?: ValueGetter;
|
|
31
26
|
/**
|
|
32
27
|
* Determines if column is checkbox
|
|
33
|
-
*
|
|
34
|
-
* @memberOf TableColumn
|
|
35
28
|
*/
|
|
36
29
|
checkboxable?: boolean;
|
|
37
30
|
/**
|
|
38
31
|
* Determines if the column is frozen to the left
|
|
39
|
-
*
|
|
40
|
-
* @memberOf TableColumn
|
|
41
32
|
*/
|
|
42
33
|
frozenLeft?: boolean;
|
|
43
34
|
/**
|
|
44
35
|
* Determines if the column is frozen to the right
|
|
45
|
-
*
|
|
46
|
-
* @memberOf TableColumn
|
|
47
36
|
*/
|
|
48
37
|
frozenRight?: boolean;
|
|
49
38
|
/**
|
|
@@ -51,68 +40,52 @@ export interface TableColumn {
|
|
|
51
40
|
* API from http =//www.w3.org/TR/css3-flexbox/. Basically;
|
|
52
41
|
* take any available extra width and distribute it proportionally
|
|
53
42
|
* according to all columns' flexGrow values.
|
|
54
|
-
*
|
|
55
|
-
* @memberOf TableColumn
|
|
56
43
|
*/
|
|
57
44
|
flexGrow?: number;
|
|
58
45
|
/**
|
|
59
46
|
* Min width of the column
|
|
60
|
-
*
|
|
61
|
-
* @memberOf TableColumn
|
|
62
47
|
*/
|
|
63
48
|
minWidth?: number;
|
|
64
49
|
/**
|
|
65
50
|
* Max width of the column
|
|
66
|
-
*
|
|
67
|
-
* @memberOf TableColumn
|
|
68
51
|
*/
|
|
69
52
|
maxWidth?: number;
|
|
70
53
|
/**
|
|
71
54
|
* The default width of the column, in pixels
|
|
72
|
-
*
|
|
73
|
-
* @memberOf TableColumn
|
|
74
55
|
*/
|
|
75
56
|
width?: number;
|
|
76
57
|
/**
|
|
77
58
|
* Can the column be resized
|
|
78
|
-
*
|
|
79
|
-
* @memberOf TableColumn
|
|
80
59
|
*/
|
|
81
60
|
resizeable?: boolean;
|
|
82
61
|
/**
|
|
83
62
|
* Custom sort comparator
|
|
84
|
-
*
|
|
85
|
-
* @memberOf TableColumn
|
|
86
63
|
*/
|
|
87
64
|
comparator?: any;
|
|
88
65
|
/**
|
|
89
66
|
* Custom pipe transforms
|
|
90
|
-
*
|
|
91
|
-
* @memberOf TableColumn
|
|
92
67
|
*/
|
|
93
68
|
pipe?: PipeTransform;
|
|
94
69
|
/**
|
|
95
70
|
* Can the column be sorted
|
|
96
|
-
*
|
|
97
|
-
* @memberOf TableColumn
|
|
98
71
|
*/
|
|
99
72
|
sortable?: boolean;
|
|
100
73
|
/**
|
|
101
74
|
* Can the column be re-arranged by dragging
|
|
102
|
-
*
|
|
103
|
-
* @memberOf TableColumn
|
|
104
75
|
*/
|
|
105
76
|
draggable?: boolean;
|
|
77
|
+
/** @internal */
|
|
78
|
+
dragging?: boolean;
|
|
79
|
+
/** @internal */
|
|
80
|
+
isTarget?: boolean;
|
|
81
|
+
/** @internal */
|
|
82
|
+
targetMarkerContext?: any;
|
|
106
83
|
/**
|
|
107
84
|
* Whether the column can automatically resize to fill space in the table.
|
|
108
|
-
*
|
|
109
|
-
* @memberOf TableColumn
|
|
110
85
|
*/
|
|
111
86
|
canAutoResize?: boolean;
|
|
112
87
|
/**
|
|
113
88
|
* Column name or label
|
|
114
|
-
*
|
|
115
|
-
* @memberOf TableColumn
|
|
116
89
|
*/
|
|
117
90
|
name?: string;
|
|
118
91
|
/**
|
|
@@ -121,70 +94,70 @@ export interface TableColumn {
|
|
|
121
94
|
* `someField` or `some.field.nested`, 0 (numeric)
|
|
122
95
|
*
|
|
123
96
|
* If left blank, will use the name as camel case conversion
|
|
124
|
-
*
|
|
125
|
-
* @memberOf TableColumn
|
|
126
97
|
*/
|
|
127
98
|
prop?: TableColumnProp;
|
|
128
99
|
/**
|
|
129
|
-
*
|
|
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" />`.
|
|
130
102
|
*
|
|
131
|
-
*
|
|
103
|
+
* **DANGER** If enabling this feature, make sure the source of the data is trusted. This can be a vector for HTML injection attacks.
|
|
132
104
|
*/
|
|
133
|
-
|
|
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>;
|
|
134
114
|
/**
|
|
135
115
|
* Header template ref
|
|
136
|
-
*
|
|
137
|
-
* @memberOf TableColumn
|
|
138
116
|
*/
|
|
139
|
-
headerTemplate?:
|
|
117
|
+
headerTemplate?: TemplateRef<HeaderCellContext>;
|
|
140
118
|
/**
|
|
141
119
|
* Tree toggle template ref
|
|
142
|
-
*
|
|
143
|
-
* @memberOf TableColumn
|
|
144
120
|
*/
|
|
145
121
|
treeToggleTemplate?: any;
|
|
146
122
|
/**
|
|
147
123
|
* CSS Classes for the cell
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* @memberOf TableColumn
|
|
151
124
|
*/
|
|
152
|
-
cellClass?: string | ((data:
|
|
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>);
|
|
153
132
|
/**
|
|
154
133
|
* CSS classes for the header
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @memberOf TableColumn
|
|
158
134
|
*/
|
|
159
|
-
headerClass?: string | ((data:
|
|
135
|
+
headerClass?: string | ((data: {
|
|
136
|
+
column: TableColumn;
|
|
137
|
+
}) => string | Record<string, boolean>);
|
|
160
138
|
/**
|
|
161
139
|
* Header checkbox enabled
|
|
162
|
-
*
|
|
163
|
-
* @memberOf TableColumn
|
|
164
140
|
*/
|
|
165
141
|
headerCheckboxable?: boolean;
|
|
166
142
|
/**
|
|
167
143
|
* Is tree displayed on this column
|
|
168
|
-
*
|
|
169
|
-
* @memberOf TableColumn
|
|
170
144
|
*/
|
|
171
145
|
isTreeColumn?: boolean;
|
|
172
146
|
/**
|
|
173
147
|
* Width of the tree level indent
|
|
174
|
-
*
|
|
175
|
-
* @memberOf TableColumn
|
|
176
148
|
*/
|
|
177
149
|
treeLevelIndent?: number;
|
|
178
150
|
/**
|
|
179
151
|
* Summary function
|
|
180
|
-
*
|
|
181
|
-
* @memberOf TableColumn
|
|
182
152
|
*/
|
|
183
153
|
summaryFunc?: (cells: any[]) => any;
|
|
184
154
|
/**
|
|
185
155
|
* Summary cell template ref
|
|
186
|
-
*
|
|
187
|
-
* @memberOf TableColumn
|
|
188
156
|
*/
|
|
189
|
-
summaryTemplate?: any
|
|
157
|
+
summaryTemplate?: TemplateRef<any>;
|
|
158
|
+
}
|
|
159
|
+
export interface TableColumnGroup {
|
|
160
|
+
left: TableColumn[];
|
|
161
|
+
center: TableColumn[];
|
|
162
|
+
right: TableColumn[];
|
|
190
163
|
}
|
|
@@ -3,9 +3,9 @@ import { DataTableColumnDirective } from '../components/columns/column.directive
|
|
|
3
3
|
/**
|
|
4
4
|
* Sets the column defaults
|
|
5
5
|
*/
|
|
6
|
-
export declare function setColumnDefaults(columns: TableColumn[]): void;
|
|
6
|
+
export declare function setColumnDefaults(columns: TableColumn[], defaultColumnWidth?: number): void;
|
|
7
7
|
export declare function isNullOrUndefined<T>(value: T | null | undefined): value is null | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* Translates templates definitions to objects
|
|
10
10
|
*/
|
|
11
|
-
export declare function translateTemplates(templates: DataTableColumnDirective[]):
|
|
11
|
+
export declare function translateTemplates<TRow>(templates: DataTableColumnDirective<TRow>[]): TableColumn[];
|
package/lib/utils/column.d.ts
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
|
+
import { TableColumn, TableColumnGroup } from '../types/table-column.type';
|
|
2
|
+
import { ColumnGroupWidth, PinnedColumns } from '../types/internal.types';
|
|
1
3
|
/**
|
|
2
4
|
* Returns the columns by pin.
|
|
3
5
|
*/
|
|
4
|
-
export declare function columnsByPin(cols:
|
|
5
|
-
left: any;
|
|
6
|
-
center: any;
|
|
7
|
-
right: any;
|
|
8
|
-
};
|
|
6
|
+
export declare function columnsByPin(cols: TableColumn[]): TableColumnGroup;
|
|
9
7
|
/**
|
|
10
8
|
* Returns the widths of all group sets of a column
|
|
11
9
|
*/
|
|
12
|
-
export declare function columnGroupWidths(groups:
|
|
13
|
-
left: number;
|
|
14
|
-
center: number;
|
|
15
|
-
right: number;
|
|
16
|
-
total: number;
|
|
17
|
-
};
|
|
10
|
+
export declare function columnGroupWidths(groups: TableColumnGroup, all: TableColumn[]): ColumnGroupWidth;
|
|
18
11
|
/**
|
|
19
12
|
* Calculates the total width of all columns and their groups
|
|
20
13
|
*/
|
|
21
|
-
export declare function columnTotalWidth(columns:
|
|
14
|
+
export declare function columnTotalWidth(columns: TableColumn[], prop?: string): number;
|
|
22
15
|
/**
|
|
23
16
|
* Calculates the total width of all columns and their groups
|
|
24
17
|
*/
|
|
25
|
-
export declare function columnsTotalWidth(columns:
|
|
26
|
-
export declare function columnsByPinArr(val:
|
|
18
|
+
export declare function columnsTotalWidth(columns: TableColumn[], prop?: keyof TableColumn): number;
|
|
19
|
+
export declare function columnsByPinArr(val: TableColumn[]): PinnedColumns[];
|
package/lib/utils/keys.d.ts
CHANGED
package/lib/utils/math.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { TableColumn } from '../types/table-column.type';
|
|
1
2
|
/**
|
|
2
3
|
* Calculates the Total Flex Grow
|
|
3
4
|
*/
|
|
4
|
-
export declare function getTotalFlexGrow(columns:
|
|
5
|
+
export declare function getTotalFlexGrow(columns: TableColumn[]): number;
|
|
5
6
|
/**
|
|
6
7
|
* Adjusts the column widths.
|
|
7
8
|
* Inspired by: https://github.com/facebook/fixed-data-table/blob/master/src/FixedDataTableWidthHelper.js
|
|
8
9
|
*/
|
|
9
|
-
export declare function adjustColumnWidths(allColumns:
|
|
10
|
+
export declare function adjustColumnWidths(allColumns: TableColumn[], expectedWidth: number): void;
|
|
10
11
|
/**
|
|
11
12
|
* Forces the width of the columns to
|
|
12
13
|
* distribute equally but overflowing when necessary
|
|
@@ -26,4 +27,4 @@ export declare function adjustColumnWidths(allColumns: any, expectedWidth: any):
|
|
|
26
27
|
* - If the grid starts off small but then becomes greater than the size ( + / - )
|
|
27
28
|
* the width should use the original width; not the newly proportioned widths.
|
|
28
29
|
*/
|
|
29
|
-
export declare function forceFillColumnWidths(allColumns:
|
|
30
|
+
export declare function forceFillColumnWidths(allColumns: TableColumn[], expectedWidth: number, startIdx: number, allowBleed: boolean, defaultColWidth?: number, verticalScrollWidth?: number): void;
|
package/lib/utils/selection.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function selectRows(selected:
|
|
2
|
-
export declare function selectRowsBetween(selected:
|
|
1
|
+
export declare function selectRows<TRow>(selected: TRow[], row: TRow, comparefn: any): TRow[];
|
|
2
|
+
export declare function selectRowsBetween<TRow>(selected: TRow[], rows: TRow[], index: number, prevIndex: number): TRow[];
|
package/lib/utils/sort.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { SortType } from '../types/
|
|
2
|
-
import {
|
|
3
|
-
import { SortPropDir } from '../types/sort-prop-dir.type';
|
|
1
|
+
import { Group, SortDirection, SortPropDir, SortType } from '../types/public.types';
|
|
2
|
+
import { TableColumn } from '../types/table-column.type';
|
|
4
3
|
/**
|
|
5
4
|
* Gets the next sort direction
|
|
6
5
|
*/
|
|
7
|
-
export declare function nextSortDir(sortType: SortType, current: SortDirection): SortDirection | undefined;
|
|
6
|
+
export declare function nextSortDir(sortType: SortType, current: SortDirection | 'desc' | 'asc'): SortDirection | undefined;
|
|
8
7
|
/**
|
|
9
8
|
* Adapted from fueld-ui on 6/216
|
|
10
9
|
* https://github.com/FuelInteractive/fuel-ui/tree/master/src/pipes/OrderBy
|
|
@@ -14,4 +13,5 @@ export declare function orderByComparator(a: any, b: any): number;
|
|
|
14
13
|
* creates a shallow copy of the `rows` input and returns the sorted copy. this function
|
|
15
14
|
* does not sort the `rows` argument in place
|
|
16
15
|
*/
|
|
17
|
-
export declare function sortRows(rows:
|
|
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>[];
|
|
@@ -0,0 +1,7 @@
|
|
|
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/tree.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableColumnProp } from '../types/table-column.type';
|
|
2
|
-
export
|
|
2
|
+
export type OptionalValueGetter = (row: any) => any | undefined;
|
|
3
3
|
export declare function optionalGetterForProp(prop: TableColumnProp): OptionalValueGetter;
|
|
4
4
|
/**
|
|
5
5
|
* This functions rearrange items by their parents
|
|
@@ -37,4 +37,4 @@ export declare function optionalGetterForProp(prop: TableColumnProp): OptionalVa
|
|
|
37
37
|
* @param rows
|
|
38
38
|
*
|
|
39
39
|
*/
|
|
40
|
-
export declare function groupRowsByParents(rows:
|
|
40
|
+
export declare function groupRowsByParents<TRow>(rows: TRow[], from?: OptionalValueGetter, to?: OptionalValueGetter): TRow[];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swimlane/ngx-datatable",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-alpha.0",
|
|
4
4
|
"description": "ngx-datatable is an Angular table grid component for presenting large and complex data.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "
|
|
7
|
-
"@angular/core": "
|
|
8
|
-
"@angular/platform-browser": "
|
|
9
|
-
"rxjs": "
|
|
6
|
+
"@angular/common": "17.x || 18.x || 19.x",
|
|
7
|
+
"@angular/core": "17.x || 18.x || 19.x",
|
|
8
|
+
"@angular/platform-browser": "17.x || 18.x || 19.x",
|
|
9
|
+
"rxjs": "7.x"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.0.0"
|
|
@@ -29,23 +29,15 @@
|
|
|
29
29
|
"url": "https://github.com/swimlane/ngx-datatable/issues"
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/swimlane/ngx-datatable#readme",
|
|
32
|
-
"module": "
|
|
33
|
-
"
|
|
34
|
-
"esm2020": "esm2020/swimlane-ngx-datatable.mjs",
|
|
35
|
-
"fesm2020": "fesm2020/swimlane-ngx-datatable.mjs",
|
|
36
|
-
"fesm2015": "fesm2015/swimlane-ngx-datatable.mjs",
|
|
37
|
-
"typings": "swimlane-ngx-datatable.d.ts",
|
|
32
|
+
"module": "fesm2022/swimlane-ngx-datatable.mjs",
|
|
33
|
+
"typings": "index.d.ts",
|
|
38
34
|
"exports": {
|
|
39
35
|
"./package.json": {
|
|
40
36
|
"default": "./package.json"
|
|
41
37
|
},
|
|
42
38
|
".": {
|
|
43
|
-
"types": "./
|
|
44
|
-
"
|
|
45
|
-
"es2020": "./fesm2020/swimlane-ngx-datatable.mjs",
|
|
46
|
-
"es2015": "./fesm2015/swimlane-ngx-datatable.mjs",
|
|
47
|
-
"node": "./fesm2015/swimlane-ngx-datatable.mjs",
|
|
48
|
-
"default": "./fesm2020/swimlane-ngx-datatable.mjs"
|
|
39
|
+
"types": "./index.d.ts",
|
|
40
|
+
"default": "./fesm2022/swimlane-ngx-datatable.mjs"
|
|
49
41
|
}
|
|
50
42
|
},
|
|
51
43
|
"sideEffects": false
|
package/public-api.d.ts
CHANGED
|
@@ -19,37 +19,30 @@ export * from './lib/components/footer/footer-template.directive';
|
|
|
19
19
|
export * from './lib/components/columns/column.directive';
|
|
20
20
|
export * from './lib/components/columns/column-header.directive';
|
|
21
21
|
export * from './lib/components/columns/column-cell.directive';
|
|
22
|
+
export * from './lib/components/columns/column-ghost-cell.directive';
|
|
22
23
|
export * from './lib/components/columns/tree.directive';
|
|
23
24
|
export * from './lib/components/row-detail/row-detail.directive';
|
|
24
25
|
export * from './lib/components/row-detail/row-detail-template.directive';
|
|
26
|
+
export * from './lib/components/body/body-row-def.component';
|
|
25
27
|
export * from './lib/directives/draggable.directive';
|
|
26
28
|
export * from './lib/directives/long-press.directive';
|
|
27
29
|
export * from './lib/directives/orderable.directive';
|
|
28
30
|
export * from './lib/directives/resizeable.directive';
|
|
29
31
|
export * from './lib/directives/visibility.directive';
|
|
32
|
+
export * from './lib/directives/disable-row.directive';
|
|
30
33
|
export * from './lib/services/scrollbar-helper.service';
|
|
31
|
-
export * from './lib/services/dimensions-helper.service';
|
|
32
34
|
export * from './lib/services/column-changes.service';
|
|
33
|
-
export * from './lib/types/
|
|
34
|
-
export * from './lib/types/sort.type';
|
|
35
|
-
export * from './lib/types/sort-direction.type';
|
|
36
|
-
export * from './lib/types/selection.type';
|
|
37
|
-
export * from './lib/types/click.type';
|
|
35
|
+
export * from './lib/types/public.types';
|
|
38
36
|
export * from './lib/types/table-column.type';
|
|
39
|
-
export * from './lib/types/sort-prop-dir.type';
|
|
40
|
-
export * from './lib/types/contextmenu.type';
|
|
41
37
|
export * from './lib/utils/id';
|
|
42
38
|
export * from './lib/utils/column';
|
|
43
39
|
export * from './lib/utils/column-prop-getters';
|
|
44
40
|
export * from './lib/utils/camel-case';
|
|
45
41
|
export * from './lib/utils/keys';
|
|
46
42
|
export * from './lib/utils/math';
|
|
47
|
-
export * from './lib/utils/prefixes';
|
|
48
43
|
export * from './lib/utils/selection';
|
|
49
|
-
export * from './lib/utils/translate';
|
|
50
44
|
export * from './lib/utils/throttle';
|
|
51
45
|
export * from './lib/utils/sort';
|
|
52
46
|
export * from './lib/utils/row-height-cache';
|
|
53
47
|
export * from './lib/utils/column-helper';
|
|
54
|
-
export * from './lib/utils/elm-from-point';
|
|
55
48
|
export * from './lib/utils/tree';
|
package/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Swimlane <info@swimlane.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# ngx-datatable
|
|
2
|
-
|
|
3
|
-
[](https://gitter.im/swimlane/ngx-datatable?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
4
|
-
[](https://codeclimate.com/github/swimlane/ngx-datatable)
|
|
5
|
-
[](https://codeclimate.com/github/swimlane/ngx-datatable/coverage)
|
|
6
|
-
[](https://badge.fury.io/js/%40swimlane%2Fngx-datatable)
|
|
7
|
-
[](https://npmjs.org/@swimlane/ngx-datatable)
|
|
8
|
-
|
|
9
|
-
`ngx-datatable` is an Angular component for presenting large and complex data. It has all the features you would expect from any other table but in a light package with _no external dependencies_. The table was designed to be extremely flexible and light; it doesn't make any assumptions about your data or how you: filter, sort or page it.
|
|
10
|
-
|
|
11
|
-
It was built for modern browsers using _TypeScript, CSS3 and HTML5_ and Angular `8.0.0`. This is the sister project of the [angular-data-table](https://github.com/swimlane/angular-data-table) that is designed for Angular 1.x.
|
|
12
|
-
|
|
13
|
-
Check out the [documentation](https://swimlane.gitbook.io/ngx-datatable/) & [demos](http://swimlane.github.io/ngx-datatable/) for more information!
|
|
14
|
-
|
|
15
|
-
See the [changelog](https://github.com/swimlane/ngx-datatable/blob/master/docs/changelog.md) for recent changes.
|
|
16
|
-
|
|
17
|
-
## Features
|
|
18
|
-
|
|
19
|
-
- Handle large data sets ( Virtual DOM )
|
|
20
|
-
- Expressive Header and Cell Templates
|
|
21
|
-
- Horizontal & Vertical Scrolling
|
|
22
|
-
- Column Reordering & Resizing
|
|
23
|
-
- Client/Server side Pagination & Sorting
|
|
24
|
-
- Intelligent Column Width Algorithms ( Force-fill & Flex-grow )
|
|
25
|
-
- Integrated Pager
|
|
26
|
-
- Cell & Row Selection ( Single, Multi, Keyboard, Checkbox )
|
|
27
|
-
- Fixed AND Fluid height
|
|
28
|
-
- Left and Right Column Pinning
|
|
29
|
-
- Row Detail View
|
|
30
|
-
- Decoupled theme'ing with included Google Material theme
|
|
31
|
-
- Light codebase / No external dependencies
|
|
32
|
-
- AoT Compilation Support
|
|
33
|
-
- Universal Support
|
|
34
|
-
|
|
35
|
-
## Installation
|
|
36
|
-
|
|
37
|
-
To use ngx-datatable in your project install it via [npm](https://www.npmjs.com/package/@swimlane/ngx-datatable):
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
npm i @swimlane/ngx-datatable --save
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Credits
|
|
44
|
-
|
|
45
|
-
`ngx-datatable` is a [Swimlane](http://swimlane.com) open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.
|
|
46
|
-
|
|
47
|
-
[SecOps Hub](http://secopshub.com) is an open, product-agnostic, online community for security professionals to share ideas, use cases, best practices, and incident response strategies.
|