@fundamental-ngx/platform 0.43.41 → 0.43.43

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.
Files changed (59) hide show
  1. package/esm2020/approval-flow/approval-flow-add-node/approval-flow-add-node.component.mjs +1 -1
  2. package/esm2020/form/form-generator/form-generator/form-generator.component.mjs +1 -1
  3. package/esm2020/list/free-content-list-item/free-content-list-item.component.mjs +8 -6
  4. package/esm2020/list/list.component.mjs +1 -1
  5. package/esm2020/smart-filter-bar/components/smart-filter-bar-conditions-dialog/smart-filter-bar-conditions-dialog.component.mjs +1 -1
  6. package/esm2020/smart-filter-bar/components/smart-filter-bar-settings-dialog/smart-filter-bar-settings-dialog.component.mjs +1 -1
  7. package/esm2020/table/components/table-cell-header-popover/table-cell-header-popover.component.mjs +3 -3
  8. package/esm2020/table/components/table-row/table-row.component.mjs +1 -1
  9. package/esm2020/table/table.component.mjs +9 -5
  10. package/esm2020/table-helpers/directives/table-cell-resizable.directive.mjs +30 -24
  11. package/esm2020/table-helpers/directives/table-virtual-scroll.directive.mjs +13 -5
  12. package/esm2020/table-helpers/services/table-column-resize.service.mjs +3 -4
  13. package/esm2020/table-helpers/table.mjs +1 -1
  14. package/esm2020/upload-collection/upload-collection/upload-collection.component.mjs +1 -1
  15. package/esm2020/value-help-dialog/value-help-dialog/value-help-dialog.component.mjs +1 -1
  16. package/esm2020/variant-management/components/manage-variants-dialog/manage-variants-dialog.component.mjs +1 -1
  17. package/fesm2015/fundamental-ngx-platform-approval-flow.mjs +1 -1
  18. package/fesm2015/fundamental-ngx-platform-approval-flow.mjs.map +1 -1
  19. package/fesm2015/fundamental-ngx-platform-form.mjs +1 -1
  20. package/fesm2015/fundamental-ngx-platform-form.mjs.map +1 -1
  21. package/fesm2015/fundamental-ngx-platform-list.mjs +7 -5
  22. package/fesm2015/fundamental-ngx-platform-list.mjs.map +1 -1
  23. package/fesm2015/fundamental-ngx-platform-smart-filter-bar.mjs +2 -2
  24. package/fesm2015/fundamental-ngx-platform-smart-filter-bar.mjs.map +1 -1
  25. package/fesm2015/fundamental-ngx-platform-table-helpers.mjs +42 -28
  26. package/fesm2015/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
  27. package/fesm2015/fundamental-ngx-platform-table.mjs +11 -7
  28. package/fesm2015/fundamental-ngx-platform-table.mjs.map +1 -1
  29. package/fesm2015/fundamental-ngx-platform-upload-collection.mjs +1 -1
  30. package/fesm2015/fundamental-ngx-platform-upload-collection.mjs.map +1 -1
  31. package/fesm2015/fundamental-ngx-platform-value-help-dialog.mjs +1 -1
  32. package/fesm2015/fundamental-ngx-platform-value-help-dialog.mjs.map +1 -1
  33. package/fesm2015/fundamental-ngx-platform-variant-management.mjs +1 -1
  34. package/fesm2015/fundamental-ngx-platform-variant-management.mjs.map +1 -1
  35. package/fesm2020/fundamental-ngx-platform-approval-flow.mjs +1 -1
  36. package/fesm2020/fundamental-ngx-platform-approval-flow.mjs.map +1 -1
  37. package/fesm2020/fundamental-ngx-platform-form.mjs +1 -1
  38. package/fesm2020/fundamental-ngx-platform-form.mjs.map +1 -1
  39. package/fesm2020/fundamental-ngx-platform-list.mjs +7 -5
  40. package/fesm2020/fundamental-ngx-platform-list.mjs.map +1 -1
  41. package/fesm2020/fundamental-ngx-platform-smart-filter-bar.mjs +2 -2
  42. package/fesm2020/fundamental-ngx-platform-smart-filter-bar.mjs.map +1 -1
  43. package/fesm2020/fundamental-ngx-platform-table-helpers.mjs +42 -28
  44. package/fesm2020/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
  45. package/fesm2020/fundamental-ngx-platform-table.mjs +11 -7
  46. package/fesm2020/fundamental-ngx-platform-table.mjs.map +1 -1
  47. package/fesm2020/fundamental-ngx-platform-upload-collection.mjs +1 -1
  48. package/fesm2020/fundamental-ngx-platform-upload-collection.mjs.map +1 -1
  49. package/fesm2020/fundamental-ngx-platform-value-help-dialog.mjs +1 -1
  50. package/fesm2020/fundamental-ngx-platform-value-help-dialog.mjs.map +1 -1
  51. package/fesm2020/fundamental-ngx-platform-variant-management.mjs +1 -1
  52. package/fesm2020/fundamental-ngx-platform-variant-management.mjs.map +1 -1
  53. package/fundamental-ngx-platform-v0.43.43.tgz +0 -0
  54. package/list/free-content-list-item/free-content-list-item.component.d.ts +3 -1
  55. package/package.json +4 -4
  56. package/schematics/ng-add/index.js +1 -1
  57. package/table/table.component.d.ts +3 -1
  58. package/table-helpers/table.d.ts +1 -0
  59. package/fundamental-ngx-platform-v0.43.41.tgz +0 -0
@@ -2560,6 +2560,12 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2560
2560
  /** @hidden */
2561
2561
  ngOnDestroy() {
2562
2562
  this._focusableGridSubscription?.unsubscribe();
2563
+ if (this.scrollWholeRows) {
2564
+ this._table.tableContainer.nativeElement.removeEventListener('wheel', this._wheelScrollListenerFunction, {
2565
+ passive: false
2566
+ });
2567
+ this._table.tableScrollMockContainer.nativeElement.removeEventListener('scroll', this._mockScrollbarListenerFunction, { passive: false });
2568
+ }
2563
2569
  }
2564
2570
  /** Sets table reference. */
2565
2571
  setTable(table) {
@@ -2588,7 +2594,7 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2588
2594
  }
2589
2595
  }
2590
2596
  const totalNodeCount = this._table._tableRowsVisible.length;
2591
- let visibleNodeCount = Math.floor(this._table.tableContainer.nativeElement.clientHeight / this.rowHeight);
2597
+ let visibleNodeCount = this._getNumberOfRowsToDisplay();
2592
2598
  visibleNodeCount = Math.min(totalNodeCount - startNodeIndex, visibleNodeCount);
2593
2599
  this.virtualScrollTotalHeight = totalNodeCount * this.rowHeight - visibleNodeCount * this.rowHeight;
2594
2600
  this._setRows(startNodeIndex);
@@ -2652,13 +2658,15 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2652
2658
  const tableContainer = this._table.tableContainer.nativeElement;
2653
2659
  let tableHeight = tableContainer.clientHeight;
2654
2660
  tableHeight = tableHeight - tableContainer.querySelector('thead').clientHeight;
2655
- const numberOfRows = Math.floor(tableHeight / (this.rowHeight + 2));
2661
+ const numberOfRows = Math.floor(tableHeight / this.rowHeight);
2662
+ let retVal;
2656
2663
  if (this._table._tableRowsVisible.length < numberOfRows) {
2657
- return this._table._tableRowsVisible.length;
2664
+ retVal = this._table._tableRowsVisible.length;
2658
2665
  }
2659
2666
  else {
2660
- return numberOfRows;
2667
+ retVal = numberOfRows;
2661
2668
  }
2669
+ return retVal;
2662
2670
  }
2663
2671
  /**
2664
2672
  * @hidden
@@ -3085,8 +3093,8 @@ class TableColumnResizeService {
3085
3093
  if (!columnWidth || !resizedElement) {
3086
3094
  return;
3087
3095
  }
3088
- if (diffX < 0 && columnWidth + diffX < TABLE_COLUMN_MIN_WIDTH) {
3089
- diffX = TABLE_COLUMN_MIN_WIDTH - columnWidth;
3096
+ if (diffX < 0 && columnWidth + diffX < this._tableRef.minimumColumnWidth) {
3097
+ diffX = this._tableRef.minimumColumnWidth - columnWidth;
3090
3098
  }
3091
3099
  if (!this.fixedWidth) {
3092
3100
  for (const [columnName, cells] of this._columnsCellMap.entries()) {
@@ -3445,7 +3453,7 @@ class PlatformTableCellResizableDirective extends TableCellDirective {
3445
3453
  ngOnInit() {
3446
3454
  this._zone.runOutsideAngular(() => {
3447
3455
  fromEvent(this.elementRef.nativeElement, 'mousemove')
3448
- .pipe(filter(() => this._tableColumnResizeService?.resizeInProgress !== true), map((event) => this._getResizer(event) || { resizerPosition: 0, resizedColumn: this.columnName }), distinctUntilChanged((prev, curr) => equal(prev, curr)), takeUntil(this._destroy$))
3456
+ .pipe(filter(() => this._tableColumnResizeService?.resizeInProgress !== true), debounceTime(5), map((event) => this._getResizer(event) || { resizerPosition: 0, resizedColumn: this.columnName }), distinctUntilChanged((prev, curr) => equal(prev, curr)), takeUntil(this._destroy$))
3449
3457
  .subscribe((data) => {
3450
3458
  this._tableColumnResizeService.setInitialResizerPosition(data.resizerPosition, data.resizedColumn);
3451
3459
  });
@@ -3471,30 +3479,36 @@ class PlatformTableCellResizableDirective extends TableCellDirective {
3471
3479
  _getResizer(event) {
3472
3480
  const el = this.elementRef.nativeElement;
3473
3481
  const elPosition = el.getBoundingClientRect();
3474
- let resizerPosition;
3475
- let resizedColumn;
3476
- const pointerOnLeft = this._isRtl
3477
- ? elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3478
- : event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3479
- if (pointerOnLeft && this._resizableSide !== 'end') {
3480
- resizerPosition = this._isRtl
3481
- ? el.parentElement.offsetWidth - (el.offsetLeft + el.offsetWidth)
3482
- : el.offsetLeft;
3483
- resizedColumn = this._tableColumnResizeService.getPreviousColumnName(this.columnName);
3484
- }
3485
- const pointerOnRight = this._isRtl
3486
- ? event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3487
- : elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3488
- if (pointerOnRight && this._resizableSide !== 'start') {
3489
- resizerPosition = this._isRtl
3490
- ? el.parentElement.offsetWidth - el.offsetLeft
3491
- : el.offsetLeft + el.offsetWidth;
3492
- resizedColumn = this.columnName;
3482
+ // check if mouse is within 5px of cell border
3483
+ if (event.clientX > elPosition.x + elPosition.width - 5 || event.clientX < elPosition.x + 5) {
3484
+ let resizerPosition;
3485
+ let resizedColumn;
3486
+ const pointerOnLeft = this._isRtl
3487
+ ? elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3488
+ : event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3489
+ if (pointerOnLeft && this._resizableSide !== 'end') {
3490
+ resizerPosition = this._isRtl
3491
+ ? el.parentElement.offsetWidth - (el.offsetLeft + el.offsetWidth)
3492
+ : el.offsetLeft;
3493
+ resizedColumn = this._tableColumnResizeService.getPreviousColumnName(this.columnName);
3494
+ }
3495
+ const pointerOnRight = this._isRtl
3496
+ ? event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3497
+ : elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3498
+ if (pointerOnRight && this._resizableSide !== 'start') {
3499
+ resizerPosition = this._isRtl
3500
+ ? el.parentElement.offsetWidth - el.offsetLeft
3501
+ : el.offsetLeft + el.offsetWidth;
3502
+ resizedColumn = this.columnName;
3503
+ }
3504
+ if (!resizedColumn) {
3505
+ return null;
3506
+ }
3507
+ return { resizerPosition: resizerPosition, resizedColumn };
3493
3508
  }
3494
- if (!resizedColumn) {
3509
+ else {
3495
3510
  return null;
3496
3511
  }
3497
- return { resizerPosition: resizerPosition, resizedColumn };
3498
3512
  }
3499
3513
  }
3500
3514
  PlatformTableCellResizableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PlatformTableCellResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });