@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
@@ -2571,6 +2571,12 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2571
2571
  ngOnDestroy() {
2572
2572
  var _a;
2573
2573
  (_a = this._focusableGridSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2574
+ if (this.scrollWholeRows) {
2575
+ this._table.tableContainer.nativeElement.removeEventListener('wheel', this._wheelScrollListenerFunction, {
2576
+ passive: false
2577
+ });
2578
+ this._table.tableScrollMockContainer.nativeElement.removeEventListener('scroll', this._mockScrollbarListenerFunction, { passive: false });
2579
+ }
2574
2580
  }
2575
2581
  /** Sets table reference. */
2576
2582
  setTable(table) {
@@ -2599,7 +2605,7 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2599
2605
  }
2600
2606
  }
2601
2607
  const totalNodeCount = this._table._tableRowsVisible.length;
2602
- let visibleNodeCount = Math.floor(this._table.tableContainer.nativeElement.clientHeight / this.rowHeight);
2608
+ let visibleNodeCount = this._getNumberOfRowsToDisplay();
2603
2609
  visibleNodeCount = Math.min(totalNodeCount - startNodeIndex, visibleNodeCount);
2604
2610
  this.virtualScrollTotalHeight = totalNodeCount * this.rowHeight - visibleNodeCount * this.rowHeight;
2605
2611
  this._setRows(startNodeIndex);
@@ -2660,13 +2666,15 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2660
2666
  const tableContainer = this._table.tableContainer.nativeElement;
2661
2667
  let tableHeight = tableContainer.clientHeight;
2662
2668
  tableHeight = tableHeight - tableContainer.querySelector('thead').clientHeight;
2663
- const numberOfRows = Math.floor(tableHeight / (this.rowHeight + 2));
2669
+ const numberOfRows = Math.floor(tableHeight / this.rowHeight);
2670
+ let retVal;
2664
2671
  if (this._table._tableRowsVisible.length < numberOfRows) {
2665
- return this._table._tableRowsVisible.length;
2672
+ retVal = this._table._tableRowsVisible.length;
2666
2673
  }
2667
2674
  else {
2668
- return numberOfRows;
2675
+ retVal = numberOfRows;
2669
2676
  }
2677
+ return retVal;
2670
2678
  }
2671
2679
  /**
2672
2680
  * @hidden
@@ -3087,8 +3095,8 @@ class TableColumnResizeService {
3087
3095
  if (!columnWidth || !resizedElement) {
3088
3096
  return;
3089
3097
  }
3090
- if (diffX < 0 && columnWidth + diffX < TABLE_COLUMN_MIN_WIDTH) {
3091
- diffX = TABLE_COLUMN_MIN_WIDTH - columnWidth;
3098
+ if (diffX < 0 && columnWidth + diffX < this._tableRef.minimumColumnWidth) {
3099
+ diffX = this._tableRef.minimumColumnWidth - columnWidth;
3092
3100
  }
3093
3101
  if (!this.fixedWidth) {
3094
3102
  for (const [columnName, cells] of this._columnsCellMap.entries()) {
@@ -3458,7 +3466,7 @@ class PlatformTableCellResizableDirective extends TableCellDirective {
3458
3466
  ngOnInit() {
3459
3467
  this._zone.runOutsideAngular(() => {
3460
3468
  fromEvent(this.elementRef.nativeElement, 'mousemove')
3461
- .pipe(filter(() => { var _a; return ((_a = this._tableColumnResizeService) === null || _a === void 0 ? void 0 : _a.resizeInProgress) !== true; }), map((event) => this._getResizer(event) || { resizerPosition: 0, resizedColumn: this.columnName }), distinctUntilChanged((prev, curr) => equal(prev, curr)), takeUntil(this._destroy$))
3469
+ .pipe(filter(() => { var _a; return ((_a = this._tableColumnResizeService) === null || _a === void 0 ? void 0 : _a.resizeInProgress) !== true; }), debounceTime(5), map((event) => this._getResizer(event) || { resizerPosition: 0, resizedColumn: this.columnName }), distinctUntilChanged((prev, curr) => equal(prev, curr)), takeUntil(this._destroy$))
3462
3470
  .subscribe((data) => {
3463
3471
  this._tableColumnResizeService.setInitialResizerPosition(data.resizerPosition, data.resizedColumn);
3464
3472
  });
@@ -3486,30 +3494,36 @@ class PlatformTableCellResizableDirective extends TableCellDirective {
3486
3494
  _getResizer(event) {
3487
3495
  const el = this.elementRef.nativeElement;
3488
3496
  const elPosition = el.getBoundingClientRect();
3489
- let resizerPosition;
3490
- let resizedColumn;
3491
- const pointerOnLeft = this._isRtl
3492
- ? elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3493
- : event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3494
- if (pointerOnLeft && this._resizableSide !== 'end') {
3495
- resizerPosition = this._isRtl
3496
- ? el.parentElement.offsetWidth - (el.offsetLeft + el.offsetWidth)
3497
- : el.offsetLeft;
3498
- resizedColumn = this._tableColumnResizeService.getPreviousColumnName(this.columnName);
3499
- }
3500
- const pointerOnRight = this._isRtl
3501
- ? event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3502
- : elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3503
- if (pointerOnRight && this._resizableSide !== 'start') {
3504
- resizerPosition = this._isRtl
3505
- ? el.parentElement.offsetWidth - el.offsetLeft
3506
- : el.offsetLeft + el.offsetWidth;
3507
- resizedColumn = this.columnName;
3497
+ // check if mouse is within 5px of cell border
3498
+ if (event.clientX > elPosition.x + elPosition.width - 5 || event.clientX < elPosition.x + 5) {
3499
+ let resizerPosition;
3500
+ let resizedColumn;
3501
+ const pointerOnLeft = this._isRtl
3502
+ ? elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3503
+ : event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3504
+ if (pointerOnLeft && this._resizableSide !== 'end') {
3505
+ resizerPosition = this._isRtl
3506
+ ? el.parentElement.offsetWidth - (el.offsetLeft + el.offsetWidth)
3507
+ : el.offsetLeft;
3508
+ resizedColumn = this._tableColumnResizeService.getPreviousColumnName(this.columnName);
3509
+ }
3510
+ const pointerOnRight = this._isRtl
3511
+ ? event.clientX - elPosition.left < TABLE_CELL_RESIZABLE_THRESHOLD_PX
3512
+ : elPosition.right - event.clientX < TABLE_CELL_RESIZABLE_THRESHOLD_PX;
3513
+ if (pointerOnRight && this._resizableSide !== 'start') {
3514
+ resizerPosition = this._isRtl
3515
+ ? el.parentElement.offsetWidth - el.offsetLeft
3516
+ : el.offsetLeft + el.offsetWidth;
3517
+ resizedColumn = this.columnName;
3518
+ }
3519
+ if (!resizedColumn) {
3520
+ return null;
3521
+ }
3522
+ return { resizerPosition: resizerPosition, resizedColumn };
3508
3523
  }
3509
- if (!resizedColumn) {
3524
+ else {
3510
3525
  return null;
3511
3526
  }
3512
- return { resizerPosition: resizerPosition, resizedColumn };
3513
3527
  }
3514
3528
  }
3515
3529
  PlatformTableCellResizableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PlatformTableCellResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });