@fundamental-ngx/platform 0.43.35 → 0.43.37
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/esm2020/form/multi-combobox/multi-combobox/multi-combobox.component.mjs +3 -1
- package/esm2020/table/components/table-row/table-row.component.mjs +4 -3
- package/esm2020/table/table.component.mjs +55 -12
- package/esm2020/table-helpers/directives/table-virtual-scroll.directive.mjs +235 -37
- package/esm2020/table-helpers/models/directives.mjs +1 -1
- package/esm2020/table-helpers/services/table-column-resize.service.mjs +26 -5
- package/esm2020/table-helpers/table.mjs +1 -1
- package/fesm2015/fundamental-ngx-platform-form.mjs +2 -0
- package/fesm2015/fundamental-ngx-platform-form.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-platform-table-helpers.mjs +363 -147
- package/fesm2015/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-platform-table.mjs +177 -133
- package/fesm2015/fundamental-ngx-platform-table.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-form.mjs +2 -0
- package/fesm2020/fundamental-ngx-platform-form.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-table-helpers.mjs +364 -148
- package/fesm2020/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-table.mjs +176 -133
- package/fesm2020/fundamental-ngx-platform-table.mjs.map +1 -1
- package/fundamental-ngx-platform-v0.43.37.tgz +0 -0
- package/package.json +4 -4
- package/schematics/ng-add/index.js +1 -1
- package/table/table.component.d.ts +9 -0
- package/table-helpers/directives/table-virtual-scroll.directive.d.ts +64 -5
- package/table-helpers/models/directives.d.ts +1 -0
- package/table-helpers/services/table-column-resize.service.d.ts +4 -0
- package/table-helpers/table.d.ts +10 -2
- package/fundamental-ngx-platform-v0.43.35.tgz +0 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fundamental-ngx/platform",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.37",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"description": "Fundamental Library for Angular - platform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"node": ">= 10"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@fundamental-ngx/core": "0.43.
|
|
16
|
+
"@fundamental-ngx/core": "0.43.37"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fundamental-ngx/cdk": "0.43.
|
|
20
|
-
"@fundamental-ngx/i18n": "0.43.
|
|
19
|
+
"@fundamental-ngx/cdk": "0.43.37",
|
|
20
|
+
"@fundamental-ngx/i18n": "0.43.37",
|
|
21
21
|
"fast-deep-equal": "3.1.3",
|
|
22
22
|
"focus-trap": "^7.1.0",
|
|
23
23
|
"lodash-es": "^4.17.0",
|
|
@@ -32,7 +32,7 @@ function callCoreSchematic(options) {
|
|
|
32
32
|
(0, dependencies_1.addPackageJsonDependency)(tree, {
|
|
33
33
|
type: dependencies_1.NodeDependencyType.Default,
|
|
34
34
|
// Will be replaced with the real version during sync-version scipt run
|
|
35
|
-
version: `0.43.
|
|
35
|
+
version: `0.43.37`,
|
|
36
36
|
name: '@fundamental-ngx/core'
|
|
37
37
|
});
|
|
38
38
|
const installTaskId = context.addTask(new tasks_1.NodePackageInstallTask({
|
|
@@ -5,6 +5,7 @@ import { SearchInput } from '@fundamental-ngx/platform/search-field';
|
|
|
5
5
|
import { CollectionFilter, CollectionGroup, CollectionSort, EditableTableCell, PlatformTableManagedPreset, RowComparator, SaveRowsEvent, SelectionModeValue, Table, TableCellActivateEvent, TableColumn, TableColumnFreezeEvent, TableColumnResizeService, TableColumnsChangeEvent, TableDataSource, TableDataSourceDirective, TableDraggable, TableFilterChangeEvent, TableGroupChangeEvent, TableInitialState, TablePageChangeEvent, TableRow, TableRowActivateEvent, TableRowClass, TableRowSelectionChangeEvent, TableRowService, TableRowToggleOpenStateEvent, TableScrollable, TableScrollDispatcherService, TableService, TableSortChangeEvent, TableState, TableVirtualScroll, ViewportRootService } from '@fundamental-ngx/platform/table-helpers';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
7
|
import { TableToolbarInterface } from './components';
|
|
8
|
+
import { TableHeaderRowComponent } from './components/table-header-row/table-header-row.component';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "@fundamental-ngx/platform/table-helpers";
|
|
10
11
|
interface ToolbarContext {
|
|
@@ -150,6 +151,8 @@ export declare class TableComponent<T = any> extends Table<T> implements AfterVi
|
|
|
150
151
|
loadPagesBefore: boolean;
|
|
151
152
|
/** @hidden */
|
|
152
153
|
_selectionMode: SelectionModeValue;
|
|
154
|
+
/** @hidden */
|
|
155
|
+
_header: TableHeaderRowComponent;
|
|
153
156
|
/** Sets selection mode for the table. 'single' | 'multiple' | 'none' */
|
|
154
157
|
set selectionMode(value: SelectionModeValue);
|
|
155
158
|
get selectionMode(): SelectionModeValue;
|
|
@@ -252,6 +255,10 @@ export declare class TableComponent<T = any> extends Table<T> implements AfterVi
|
|
|
252
255
|
/** @hidden */
|
|
253
256
|
private readonly _dndDirective;
|
|
254
257
|
/** @hidden */
|
|
258
|
+
readonly tableScrollMockContainer: ElementRef<HTMLDivElement>;
|
|
259
|
+
/** @hidden */
|
|
260
|
+
readonly tableBody: ElementRef<HTMLElement>;
|
|
261
|
+
/** @hidden */
|
|
255
262
|
readonly columns: QueryList<TableColumn>;
|
|
256
263
|
/** @hidden */
|
|
257
264
|
readonly customEditableCells: QueryList<EditableTableCell>;
|
|
@@ -682,6 +689,8 @@ export declare class TableComponent<T = any> extends Table<T> implements AfterVi
|
|
|
682
689
|
private _listenToFixedColumnsWidth;
|
|
683
690
|
/** @hidden */
|
|
684
691
|
private _calculateLastFreezableColumn;
|
|
692
|
+
/** @hidden */
|
|
693
|
+
private _setMockScrollbarPosition;
|
|
685
694
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, [null, null, null, null, null, null, { optional: true; }, null, null, null, null]>;
|
|
686
695
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "fdp-table", never, { "name": "name"; "id": "id"; "enableDragResize": "enableDragResize"; "fixed": "fixed"; "freezeColumnsTo": "freezeColumnsTo"; "freezeEndColumnsTo": "freezeEndColumnsTo"; "pageScrolling": "pageScrolling"; "pageSize": "pageSize"; "pageScrollingThreshold": "pageScrollingThreshold"; "bodyHeight": "bodyHeight"; "emptyTableMessage": "emptyTableMessage"; "noVisibleColumnsMessage": "noVisibleColumnsMessage"; "noHorizontalBorders": "noHorizontalBorders"; "noVerticalBorders": "noVerticalBorders"; "noBorders": "noBorders"; "noBodyBorders": "noBodyBorders"; "noOuterBorders": "noOuterBorders"; "noBorderX": "noBorderX"; "noBorderY": "noBorderY"; "relationKey": "relationKey"; "expandedStateKey": "expandedStateKey"; "hasChildrenKey": "hasChildrenKey"; "rowNavigatable": "rowNavigatable"; "highlightNavigatedRow": "highlightNavigatedRow"; "rowsActivable": "rowsActivable"; "selectedKey": "selectedKey"; "selectableKey": "selectableKey"; "trackBy": "trackBy"; "rowComparator": "rowComparator"; "rowsClass": "rowsClass"; "editableRowSkeleton": "editableRowSkeleton"; "expandOnInit": "expandOnInit"; "rowHeight": "rowHeight"; "loadPagesBefore": "loadPagesBefore"; "selectionMode": "selectionMode"; "enableTristateMode": "enableTristateMode"; "semanticHighlighting": "semanticHighlighting"; "forceCheckedAllState": "forceCheckedAllState"; "ariaLabelledBy": "ariaLabelledBy"; "nonFrozenColumnsMinWidth": "nonFrozenColumnsMinWidth"; "onlyRenderVisibleCells": "onlyRenderVisibleCells"; "useCellPlaceholder": "useCellPlaceholder"; "loading": "loading"; }, { "presetChanged": "presetChanged"; "rowSelectionChange": "rowSelectionChange"; "sortChange": "sortChange"; "filterChange": "filterChange"; "groupChange": "groupChange"; "columnsChange": "columnsChange"; "pageChange": "pageChange"; "columnFreeze": "columnFreeze"; "rowToggleOpenState": "rowToggleOpenState"; "cellActivate": "cellActivate"; "rowActivate": "rowActivate"; "rowNavigate": "rowNavigate"; "emptyRowAdded": "emptyRowAdded"; "save": "save"; "cancel": "cancel"; "tableScrolled": "tableScrolled"; "tableRowsSet": "tableRowsSet"; "allRowsExpanded": "allRowsExpanded"; "allRowsCollapsed": "allRowsCollapsed"; "cellFocused": "cellFocused"; }, ["tableToolbar", "columns", "customEditableCells"], ["fdp-table-no-data-wrapper"], false, [{ directive: typeof i1.TableDataSourceDirective; inputs: { "dataSource": "dataSource"; "childDataSource": "childDataSource"; }; outputs: { "childDataSourceChanged": "childDataSourceChanged"; "onDataRequested": "onDataRequested"; "onDataReceived": "onDataReceived"; "dataSourceChanged": "dataSourceChanged"; "dataChanged": "dataChanged"; "isLoading": "isLoading"; }; }, { directive: typeof i1.TableHeaderResizerDirective; inputs: {}; outputs: {}; }]>;
|
|
687
696
|
}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
3
|
import { TableVirtualScroll } from '../models';
|
|
4
4
|
import { Table } from '../table';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TableVirtualScrollDirective extends TableVirtualScroll implements OnChanges {
|
|
6
|
+
export declare class TableVirtualScrollDirective extends TableVirtualScroll implements OnInit, OnChanges, OnDestroy {
|
|
7
7
|
/** Whether to show only visible rows in matter of performance
|
|
8
8
|
* false by default, when true setting bodyHeight and rowHeight is required.
|
|
9
9
|
*/
|
|
10
10
|
virtualScroll: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to scroll whole rows rather than pixel by pixel when the user performs a scroll.
|
|
13
|
+
* This gives greater performance improvements but also lends to some potentially undesirable UX changes.
|
|
14
|
+
* A "rowHeight" must be provided when using this feature.
|
|
15
|
+
*/
|
|
16
|
+
set scrollWholeRows(value: boolean);
|
|
17
|
+
get scrollWholeRows(): boolean;
|
|
11
18
|
/** Cache size for the virtualScroll, default is 40 in each direction */
|
|
12
19
|
renderAhead: number;
|
|
13
20
|
/** Body height. */
|
|
@@ -28,19 +35,71 @@ export declare class TableVirtualScrollDirective extends TableVirtualScroll impl
|
|
|
28
35
|
/** @hidden */
|
|
29
36
|
private readonly _tableScrollDispatcher;
|
|
30
37
|
/** @hidden */
|
|
38
|
+
private readonly _tableRowService;
|
|
39
|
+
/** @hidden */
|
|
31
40
|
private readonly _destroy$;
|
|
32
41
|
/** @hidden */
|
|
42
|
+
private _wheelTimeout;
|
|
43
|
+
/** @hidden */
|
|
44
|
+
private _scrollMockTimeout;
|
|
45
|
+
/** @hidden */
|
|
46
|
+
private _lastMockScrollPosition;
|
|
47
|
+
/** @hidden */
|
|
48
|
+
private _focusableGridSubscription;
|
|
49
|
+
/** @hidden */
|
|
50
|
+
private _focusedCell;
|
|
51
|
+
/** @hidden */
|
|
52
|
+
private _previousStartNodeIndex;
|
|
53
|
+
/** @hidden */
|
|
54
|
+
private _scrollWholeRows;
|
|
55
|
+
/** @hidden */
|
|
56
|
+
_keydownHandler(event: KeyboardEvent): void;
|
|
57
|
+
/** @hidden */
|
|
58
|
+
ngOnInit(): void;
|
|
59
|
+
/** @hidden */
|
|
33
60
|
ngOnChanges(changes: SimpleChanges): void;
|
|
61
|
+
/** @hidden */
|
|
62
|
+
ngOnDestroy(): void;
|
|
34
63
|
/** Sets table reference. */
|
|
35
64
|
setTable(table: Table): void;
|
|
36
65
|
/**
|
|
37
|
-
*
|
|
66
|
+
* This function determines how many rows can be displayed in the table, and sets the rows in the table based on the
|
|
67
|
+
* start node index, which may come from the table state
|
|
38
68
|
*/
|
|
39
69
|
calculateVirtualScrollRows(): void;
|
|
40
70
|
/**
|
|
41
|
-
*
|
|
71
|
+
* @hidden
|
|
72
|
+
* Initialises scroll listeners.
|
|
42
73
|
*/
|
|
43
74
|
listenOnVirtualScroll(): void;
|
|
75
|
+
/** @hidden */
|
|
76
|
+
private _getNumberOfRowsToDisplay;
|
|
77
|
+
/**
|
|
78
|
+
* @hidden
|
|
79
|
+
* This function is called when the user performs a wheel event. It determines whether or not the user has scrolled
|
|
80
|
+
* up or down using the event's deltaX property, and scrolls the table by one row.
|
|
81
|
+
*/
|
|
82
|
+
private _wheelScrollListenerFunction;
|
|
83
|
+
/**
|
|
84
|
+
* @hidden
|
|
85
|
+
* This function is called when the mock scrollbar (when using 'scrollWholeRows') is moved. It determines if the
|
|
86
|
+
* scroll was up or down by comparing the current scroll top to the previous scroll top and scrolls rows accordingly.
|
|
87
|
+
*/
|
|
88
|
+
private _mockScrollbarListenerFunction;
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
* This function, used only when 'scrollWholeRows' is truthy, calculates what should be the new starting node, based
|
|
92
|
+
* off the previous starting node and the provided 'count' parameter. For example if the previous start node was 10
|
|
93
|
+
* and the count parameter is -2, the new starting node will be 8. This function also programmatically moves the
|
|
94
|
+
* mock scrollbar.
|
|
95
|
+
*/
|
|
96
|
+
private _scrollRow;
|
|
97
|
+
/**
|
|
98
|
+
* @hidden
|
|
99
|
+
* This function sets rows in the table's viewport depending on the provided starting node. It also sets the table
|
|
100
|
+
* state.
|
|
101
|
+
*/
|
|
102
|
+
private _setRows;
|
|
44
103
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableVirtualScrollDirective, never>;
|
|
45
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TableVirtualScrollDirective, "fdp-table[virtualScroll]", never, { "virtualScroll": "virtualScroll"; "renderAhead": "renderAhead"; "bodyHeight": "bodyHeight"; "rowHeight": "rowHeight"; }, {}, never, never, true, never>;
|
|
104
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableVirtualScrollDirective, "fdp-table[virtualScroll]", never, { "virtualScroll": "virtualScroll"; "scrollWholeRows": "scrollWholeRows"; "renderAhead": "renderAhead"; "bodyHeight": "bodyHeight"; "rowHeight": "rowHeight"; }, {}, never, never, true, never>;
|
|
46
105
|
}
|
|
@@ -34,6 +34,7 @@ export declare abstract class TableVirtualScroll {
|
|
|
34
34
|
abstract virtualScrollTransform$: Observable<number>;
|
|
35
35
|
abstract virtualScroll: boolean;
|
|
36
36
|
abstract virtualScrollTotalHeight: number;
|
|
37
|
+
abstract scrollWholeRows: boolean;
|
|
37
38
|
abstract setTable(table: Table): void;
|
|
38
39
|
abstract listenOnVirtualScroll(): void;
|
|
39
40
|
abstract calculateVirtualScrollRows(): void;
|
|
@@ -50,6 +50,8 @@ export declare class TableColumnResizeService implements OnDestroy {
|
|
|
50
50
|
private _resizerMoveSubscription;
|
|
51
51
|
/** @hidden */
|
|
52
52
|
private _tableRef;
|
|
53
|
+
/** @hidden */
|
|
54
|
+
private _initialTableWidth;
|
|
53
55
|
/** Indicate if resizing process in progress. */
|
|
54
56
|
get resizeInProgress(): boolean;
|
|
55
57
|
/** Resize progress stream. */
|
|
@@ -104,6 +106,8 @@ export declare class TableColumnResizeService implements OnDestroy {
|
|
|
104
106
|
finishResize(event: MouseEvent): void;
|
|
105
107
|
/** Update columns width after resizing, prevent from having too small columns. */
|
|
106
108
|
_processResize(diffX: number): void;
|
|
109
|
+
/** @hidden */
|
|
110
|
+
_setInitialTableWidth(): void;
|
|
107
111
|
/** Update column resizer position. */
|
|
108
112
|
private _updateResizerPositionOnMouseMove;
|
|
109
113
|
/**
|
package/table-helpers/table.d.ts
CHANGED
|
@@ -2,15 +2,17 @@ import { ElementRef, EventEmitter, Injector } from '@angular/core';
|
|
|
2
2
|
import { SearchInput } from '@fundamental-ngx/platform/search-field';
|
|
3
3
|
import { PresetManagedComponent } from '@fundamental-ngx/platform/shared';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { Nullable } from '@fundamental-ngx/cdk/utils';
|
|
5
|
+
import { FocusableGridDirective, Nullable } from '@fundamental-ngx/cdk/utils';
|
|
6
6
|
import { TableDataSource } from './domain';
|
|
7
7
|
import { CollectionFilter } from './interfaces/collection-filter.interface';
|
|
8
8
|
import { CollectionGroup } from './interfaces/collection-group.interface';
|
|
9
9
|
import { CollectionSort } from './interfaces/collection-sort.interface';
|
|
10
10
|
import { TableState } from './interfaces/table-state.interface';
|
|
11
|
-
import { PlatformTableManagedPreset, SaveRowsEvent, TableInitialState, TableRow } from './models';
|
|
11
|
+
import { PlatformTableManagedPreset, SaveRowsEvent, TableInitialState, TableRow, TableVirtualScroll } from './models';
|
|
12
12
|
import { TableScrollable } from './services/table-scroll-dispatcher.service';
|
|
13
13
|
import { TableColumn } from './table-column';
|
|
14
|
+
import { SelectionModeValue } from './enums';
|
|
15
|
+
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
|
|
14
16
|
export declare abstract class Table<T = any> implements PresetManagedComponent<PlatformTableManagedPreset> {
|
|
15
17
|
abstract readonly name: string;
|
|
16
18
|
abstract readonly id: string;
|
|
@@ -36,10 +38,15 @@ export declare abstract class Table<T = any> implements PresetManagedComponent<P
|
|
|
36
38
|
abstract readonly tableColumnsStream: Observable<TableColumn[]>;
|
|
37
39
|
abstract readonly injector: Injector;
|
|
38
40
|
abstract readonly tableContainer: ElementRef;
|
|
41
|
+
abstract readonly tableScrollMockContainer: ElementRef;
|
|
39
42
|
abstract readonly tableScrollable: TableScrollable;
|
|
43
|
+
abstract _virtualScrollDirective: TableVirtualScroll | null;
|
|
40
44
|
abstract _tableRowsVisible: TableRow<T>[];
|
|
41
45
|
abstract _tableRows: TableRow<T>[];
|
|
42
46
|
abstract _tableRowsInViewPortPlaceholder: number[];
|
|
47
|
+
abstract _focusableGrid: FocusableGridDirective;
|
|
48
|
+
abstract _selectionMode: SelectionModeValue;
|
|
49
|
+
abstract contentDensityObserver: ContentDensityObserver;
|
|
43
50
|
/** Get table state */
|
|
44
51
|
abstract getTableState(): TableState;
|
|
45
52
|
/** Set table state */
|
|
@@ -110,6 +117,7 @@ export declare abstract class Table<T = any> implements PresetManagedComponent<P
|
|
|
110
117
|
abstract onTableRowsChanged(): void;
|
|
111
118
|
abstract refreshDndList(): void;
|
|
112
119
|
abstract clearTableRows(): void;
|
|
120
|
+
abstract _onSpyIntersect(intersected: boolean): void;
|
|
113
121
|
/** Toolbar Sort Settings button click event */
|
|
114
122
|
readonly openTableSortSettings: EventEmitter<void>;
|
|
115
123
|
/** Toolbar Filter Settings button click event */
|
|
Binary file
|