@fundamental-ngx/platform 0.43.9 → 0.43.11
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/approval-flow/approval-flow-add-node/approval-flow-add-node.component.mjs +1 -1
- package/esm2020/approval-flow/approval-flow.component.mjs +1 -1
- package/esm2020/form/multi-combobox/multi-combobox/multi-combobox.component.mjs +1 -3
- package/esm2020/table/table.component.mjs +14 -9
- package/esm2020/table-helpers/helpers.mjs +45 -9
- package/esm2020/table-helpers/services/table-column-resize.service.mjs +15 -6
- package/esm2020/table-helpers/table.mjs +1 -1
- package/fesm2015/fundamental-ngx-platform-approval-flow.mjs +2 -2
- package/fesm2015/fundamental-ngx-platform-approval-flow.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-platform-form.mjs +0 -2
- package/fesm2015/fundamental-ngx-platform-form.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-platform-table-helpers.mjs +55 -10
- package/fesm2015/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-platform-table.mjs +13 -8
- package/fesm2015/fundamental-ngx-platform-table.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-approval-flow.mjs +2 -2
- package/fesm2020/fundamental-ngx-platform-approval-flow.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-form.mjs +0 -2
- package/fesm2020/fundamental-ngx-platform-form.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-table-helpers.mjs +54 -9
- package/fesm2020/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-platform-table.mjs +13 -8
- package/fesm2020/fundamental-ngx-platform-table.mjs.map +1 -1
- package/fundamental-ngx-platform-v0.43.11.tgz +0 -0
- package/package.json +4 -4
- package/schematics/ng-add/index.js +1 -1
- package/table-helpers/helpers.d.ts +7 -5
- package/table-helpers/table.d.ts +2 -0
- package/fundamental-ngx-platform-v0.43.9.tgz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injectable, EventEmitter, inject, Directive, Input, Output, NgZone, ChangeDetectorRef, forwardRef, HostBinding, Optional, ElementRef, Inject, HostListener, Pipe, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@fundamental-ngx/cdk/utils';
|
|
4
|
-
import { DestroyedService, isString, RtlService, KeyUtil, resizeObservable, FDK_FOCUSABLE_ITEM_DIRECTIVE, FocusableItemDirective } from '@fundamental-ngx/cdk/utils';
|
|
4
|
+
import { DestroyedService, isString, dfs, RtlService, KeyUtil, resizeObservable, FDK_FOCUSABLE_ITEM_DIRECTIVE, FocusableItemDirective } from '@fundamental-ngx/cdk/utils';
|
|
5
5
|
import { isDataSource, DataSourceDirective, FD_DATA_SOURCE_TRANSFORMER } from '@fundamental-ngx/cdk/data-source';
|
|
6
6
|
import { Subject, BehaviorSubject, isObservable, Subscription, filter as filter$1, fromEvent, Observable } from 'rxjs';
|
|
7
7
|
import { map, takeUntil, take, skip, startWith, filter, debounceTime, distinctUntilChanged, share, tap } from 'rxjs/operators';
|
|
@@ -1434,7 +1434,7 @@ function newTableRow(row) {
|
|
|
1434
1434
|
if (!row.value) {
|
|
1435
1435
|
throw new Error('Unexpected value. TableRow.value cannot be undefined.');
|
|
1436
1436
|
}
|
|
1437
|
-
|
|
1437
|
+
return new TableRowImpl({
|
|
1438
1438
|
type: row.type || TableRowType.ITEM,
|
|
1439
1439
|
checked: row.checked || false,
|
|
1440
1440
|
index: row.index || 0,
|
|
@@ -1448,7 +1448,6 @@ function newTableRow(row) {
|
|
|
1448
1448
|
state: row.state || 'readonly',
|
|
1449
1449
|
children: row.children || []
|
|
1450
1450
|
});
|
|
1451
|
-
return newRow;
|
|
1452
1451
|
}
|
|
1453
1452
|
/** @hidden */
|
|
1454
1453
|
function getSelectableRows(rows, selectableKey) {
|
|
@@ -1561,6 +1560,35 @@ function convertTreeObjectsToTableRows(source, selectionMode, tableRows, rowComp
|
|
|
1561
1560
|
row.children.push(...children);
|
|
1562
1561
|
rows.push(...children);
|
|
1563
1562
|
}
|
|
1563
|
+
if (row.level === 0 && row.isTree) {
|
|
1564
|
+
dfs([row], (r) => {
|
|
1565
|
+
const children = r.children || [];
|
|
1566
|
+
const selectedChildren = [];
|
|
1567
|
+
const indeterminateChildren = [];
|
|
1568
|
+
children.forEach((child) => {
|
|
1569
|
+
if (child.checked === true) {
|
|
1570
|
+
selectedChildren.push(child);
|
|
1571
|
+
}
|
|
1572
|
+
else if (child.checked === null) {
|
|
1573
|
+
indeterminateChildren.push(child);
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
const selectedAll = selectedChildren.length === children.length && children.length > 0;
|
|
1577
|
+
const selectedSome = selectedChildren.length > 0;
|
|
1578
|
+
if (r.checked) {
|
|
1579
|
+
applySelectionToChildren(rows, r, [], []);
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
if (selectedAll) {
|
|
1583
|
+
r.checked = true;
|
|
1584
|
+
return;
|
|
1585
|
+
}
|
|
1586
|
+
if (selectedSome || indeterminateChildren.length > 0) {
|
|
1587
|
+
r.checked = null;
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1564
1592
|
});
|
|
1565
1593
|
return rows;
|
|
1566
1594
|
}
|
|
@@ -1586,6 +1614,14 @@ function getSelectionStatusByRowValue(source, selectionMode, tableRows, rowCompa
|
|
|
1586
1614
|
return rowMap;
|
|
1587
1615
|
}
|
|
1588
1616
|
/** @hidden */
|
|
1617
|
+
function applySelectionToChildren(allRows, row, addedRows, removedRows) {
|
|
1618
|
+
const allChildren = findRowChildren(row, allRows);
|
|
1619
|
+
allChildren.forEach((r) => {
|
|
1620
|
+
r.checked = row.checked;
|
|
1621
|
+
r.checked ? addedRows.push(r) : removedRows.push(r);
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
/** @hidden */
|
|
1589
1625
|
function findRowChildren(row, allRows) {
|
|
1590
1626
|
const rowsLength = allRows.length;
|
|
1591
1627
|
/**
|
|
@@ -2700,7 +2736,7 @@ class TableColumnResizeService {
|
|
|
2700
2736
|
}
|
|
2701
2737
|
/** Update columns width after resizing, prevent from having too small columns. */
|
|
2702
2738
|
_processResize(diffX) {
|
|
2703
|
-
var _a, _b;
|
|
2739
|
+
var _a, _b, _c, _d;
|
|
2704
2740
|
const resizedElement = (_b = (_a = this._columnsCellMap.get(this._resizedColumn)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.nativeElement;
|
|
2705
2741
|
const columnWidth = resizedElement === null || resizedElement === void 0 ? void 0 : resizedElement.getBoundingClientRect().width;
|
|
2706
2742
|
if (!columnWidth || !resizedElement) {
|
|
@@ -2716,14 +2752,23 @@ class TableColumnResizeService {
|
|
|
2716
2752
|
}
|
|
2717
2753
|
}
|
|
2718
2754
|
}
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2755
|
+
/**
|
|
2756
|
+
* In case "_resizedColumn" is freezable, make sure the overall width of freezable columns does not exceed the width of the table.
|
|
2757
|
+
* If it does, columns will be made unfrozen.
|
|
2758
|
+
*/
|
|
2759
|
+
if (diffX > 0 &&
|
|
2760
|
+
(this._tableRef._freezableColumns.has(this._resizedColumn) ||
|
|
2761
|
+
((_c = this._tableRef._freezableEndColumns) === null || _c === void 0 ? void 0 : _c.has(this._resizedColumn)))) {
|
|
2762
|
+
let actualWidth = this.getPrevColumnsWidth(this._resizedColumn) + columnWidth;
|
|
2763
|
+
if ((_d = this._tableRef._freezableEndColumns) === null || _d === void 0 ? void 0 : _d.has(this._resizedColumn)) {
|
|
2764
|
+
actualWidth = this.getNextColumnsWidth(this._resizedColumn) + columnWidth;
|
|
2765
|
+
}
|
|
2722
2766
|
const newWidth = actualWidth + diffX;
|
|
2723
2767
|
const maxWidth = this._tableRef.getMaxAllowedFreezableColumnsWidth();
|
|
2724
|
-
// in case "_resizedColumn" is freezable, make sure the overall width of freezable columns does not exceed the width of the table
|
|
2725
2768
|
if (newWidth >= maxWidth) {
|
|
2726
|
-
|
|
2769
|
+
this._tableRef._freezableColumns.forEach((column) => {
|
|
2770
|
+
this._tableRef.unfreeze(column.toString());
|
|
2771
|
+
});
|
|
2727
2772
|
}
|
|
2728
2773
|
}
|
|
2729
2774
|
const updatedWidth = columnWidth + diffX;
|
|
@@ -3765,5 +3810,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3765
3810
|
* Generated bundle index. Do not edit.
|
|
3766
3811
|
*/
|
|
3767
3812
|
|
|
3768
|
-
export { ArrayTableDataProvider, ArrayTableDataSource, BaseTableDataProvider, BaseTableDataSource, ChildTableDataSource, ColumnAlign, ColumnResizableSidePipe, ColumnsChange, DEFAULT_HIGHLIGHTING_KEY, DEFAULT_TABLE_PAGE, DEFAULT_TABLE_SEARCH_INPUT, DEFAULT_TABLE_STATE, EDITABLE_ROW_SEMANTIC_STATE, EditableTableCell, FDP_TABLE_DRAGGABLE_DIRECTIVE, FDP_TABLE_STATE_DIRECTIVE, FDP_TABLE_VIRTUAL_SCROLL_DIRECTIVE, FILTER_BOOLEAN_STRATEGIES, FILTER_BOOLEAN_STRATEGY, FILTER_DATE_STRATEGIES, FILTER_DATE_STRATEGY, FILTER_DEFAULT_STRATEGIES, FILTER_DEFAULT_STRATEGY, FILTER_NUMBER_STRATEGIES, FILTER_NUMBER_STRATEGY, FILTER_STRATEGY, FILTER_STRING_STRATEGIES, FILTER_STRING_STRATEGY, FdpCellDef, FdpCellSelectableDirective, FdpEditableCellDef, FdpEditableCellFormDirective, FdpHeaderCellDef, FdpTableCell, FdpTableHeader, FdpViewSettingsFilterCustomDef, FilterType, FilterableColumnDataType, ObservableTableDataProvider, ObservableTableDataSource, PageChange, PlatformTableCellResizableDirective, PlatformTableColumnResponsiveDirective, ROW_HEIGHT, RowClassesPipe, SELECTION_COLUMN_WIDTH, SEMANTIC_HIGHLIGHTING_COLUMN_WIDTH, SaveRowsEvent, SelectionCellStylesPipe, SelectionMode, SortDirection, TABLE_CELL_RESIZABLE_THRESHOLD_PX, TABLE_COLUMN_MIN_WIDTH, TABLE_RESIZER_BORDER_WIDTH, TABLE_SCROLLABLE, Table, TableCellHeaderPopoverDirective, TableCellStylesPipe, TableChildrenDataProvider, TableColumn, TableColumnFreezeEvent, TableColumnResizeService, TableColumnsChangeEvent, TableDataProvider, TableDataSource, TableDataSourceDirective, TableDataSourceParser, TableDraggable, TableDraggableDirective, TableFilterChangeEvent, TableGroupChangeEvent, TableHeaderResizerDirective, TableHelpersModule, TableInitialState, TableInitialStateDirective, TablePageChangeEvent, TableResponsiveService, TableRowActivateEvent, TableRowImpl, TableRowSelectionChangeEvent, TableRowService, TableRowToggleOpenStateEvent, TableRowType, TableRowsRearrangeEvent, TableScrollDispatcherService, TableScrollableDirective, TableSearchChangeEvent, TableSelectionChangeEvent, TableService, TableSortChangeEvent, TableVirtualScroll, TableVirtualScrollDirective, buildNewRowSkeleton, convertObjectsToTableRows, convertTreeLikeToFlatList, convertTreeObjectsToTableRows, convertTreeTableRowToFlatList, createGroupedTableRowsTree, filterByBoolean, filterByDate, filterByNumber, filterByString, findRowChildren, getFilterStrategiesBasedOnDataType, getFreezableColumns, getFreezableEndColumns, getRowParents, getScrollBarWidth, getSelectableRows, getSelectionStatusByRowValue, getUniqueListValuesByKey, isCollectionFilter, isGroupRow, isItemRow, isRowNavigatable, isSelectableRow, isTableRow, isTreeRow, isTreeRowFirstCell, newTableRow, sortTreeLikeGroupedRows, toDataStream };
|
|
3813
|
+
export { ArrayTableDataProvider, ArrayTableDataSource, BaseTableDataProvider, BaseTableDataSource, ChildTableDataSource, ColumnAlign, ColumnResizableSidePipe, ColumnsChange, DEFAULT_HIGHLIGHTING_KEY, DEFAULT_TABLE_PAGE, DEFAULT_TABLE_SEARCH_INPUT, DEFAULT_TABLE_STATE, EDITABLE_ROW_SEMANTIC_STATE, EditableTableCell, FDP_TABLE_DRAGGABLE_DIRECTIVE, FDP_TABLE_STATE_DIRECTIVE, FDP_TABLE_VIRTUAL_SCROLL_DIRECTIVE, FILTER_BOOLEAN_STRATEGIES, FILTER_BOOLEAN_STRATEGY, FILTER_DATE_STRATEGIES, FILTER_DATE_STRATEGY, FILTER_DEFAULT_STRATEGIES, FILTER_DEFAULT_STRATEGY, FILTER_NUMBER_STRATEGIES, FILTER_NUMBER_STRATEGY, FILTER_STRATEGY, FILTER_STRING_STRATEGIES, FILTER_STRING_STRATEGY, FdpCellDef, FdpCellSelectableDirective, FdpEditableCellDef, FdpEditableCellFormDirective, FdpHeaderCellDef, FdpTableCell, FdpTableHeader, FdpViewSettingsFilterCustomDef, FilterType, FilterableColumnDataType, ObservableTableDataProvider, ObservableTableDataSource, PageChange, PlatformTableCellResizableDirective, PlatformTableColumnResponsiveDirective, ROW_HEIGHT, RowClassesPipe, SELECTION_COLUMN_WIDTH, SEMANTIC_HIGHLIGHTING_COLUMN_WIDTH, SaveRowsEvent, SelectionCellStylesPipe, SelectionMode, SortDirection, TABLE_CELL_RESIZABLE_THRESHOLD_PX, TABLE_COLUMN_MIN_WIDTH, TABLE_RESIZER_BORDER_WIDTH, TABLE_SCROLLABLE, Table, TableCellHeaderPopoverDirective, TableCellStylesPipe, TableChildrenDataProvider, TableColumn, TableColumnFreezeEvent, TableColumnResizeService, TableColumnsChangeEvent, TableDataProvider, TableDataSource, TableDataSourceDirective, TableDataSourceParser, TableDraggable, TableDraggableDirective, TableFilterChangeEvent, TableGroupChangeEvent, TableHeaderResizerDirective, TableHelpersModule, TableInitialState, TableInitialStateDirective, TablePageChangeEvent, TableResponsiveService, TableRowActivateEvent, TableRowImpl, TableRowSelectionChangeEvent, TableRowService, TableRowToggleOpenStateEvent, TableRowType, TableRowsRearrangeEvent, TableScrollDispatcherService, TableScrollableDirective, TableSearchChangeEvent, TableSelectionChangeEvent, TableService, TableSortChangeEvent, TableVirtualScroll, TableVirtualScrollDirective, applySelectionToChildren, buildNewRowSkeleton, convertObjectsToTableRows, convertTreeLikeToFlatList, convertTreeObjectsToTableRows, convertTreeTableRowToFlatList, createGroupedTableRowsTree, filterByBoolean, filterByDate, filterByNumber, filterByString, findRowChildren, getFilterStrategiesBasedOnDataType, getFreezableColumns, getFreezableEndColumns, getRowParents, getScrollBarWidth, getSelectableRows, getSelectionStatusByRowValue, getUniqueListValuesByKey, isCollectionFilter, isGroupRow, isItemRow, isRowNavigatable, isSelectableRow, isTableRow, isTreeRow, isTreeRowFirstCell, newTableRow, sortTreeLikeGroupedRows, toDataStream };
|
|
3769
3814
|
//# sourceMappingURL=fundamental-ngx-platform-table-helpers.mjs.map
|