@fundamental-ngx/platform 0.64.2-rc.39 → 0.64.2-rc.40
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/fesm2022/fundamental-ngx-platform-table-helpers.mjs +68 -53
- package/fesm2022/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-table.mjs +53 -70
- package/fesm2022/fundamental-ngx-platform-table.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/ng-add/index.js +1 -1
- package/schematics/package.json +1 -1
- package/types/fundamental-ngx-platform-table-helpers.d.ts +7 -6
- package/types/fundamental-ngx-platform-table.d.ts +3 -9
|
@@ -740,6 +740,8 @@ class TableColumnResizeService {
|
|
|
740
740
|
this._rtlService = inject(RtlService, {
|
|
741
741
|
optional: true
|
|
742
742
|
});
|
|
743
|
+
/** @hidden */
|
|
744
|
+
this._ngZone = inject(NgZone, { optional: true });
|
|
743
745
|
this._tableScrollDispatcherService
|
|
744
746
|
?.horizontallyScrolled()
|
|
745
747
|
.pipe(takeUntilDestroyed(this._destroyed))
|
|
@@ -937,7 +939,7 @@ class TableColumnResizeService {
|
|
|
937
939
|
}
|
|
938
940
|
/** Update column resizer position. */
|
|
939
941
|
_updateResizerPositionOnMouseMove() {
|
|
940
|
-
|
|
942
|
+
const setupMouseMove = () => fromEvent(document, 'mousemove')
|
|
941
943
|
.pipe(debounceTime(10))
|
|
942
944
|
.subscribe((event) => {
|
|
943
945
|
const clientStartX = this._clientStartX ?? 0;
|
|
@@ -945,6 +947,9 @@ class TableColumnResizeService {
|
|
|
945
947
|
this._resizerPosition = (this._startX ?? 0) + diffX;
|
|
946
948
|
this.resizerPosition$.next(this.resizerPosition);
|
|
947
949
|
});
|
|
950
|
+
this._resizerMoveSubscription = this._ngZone
|
|
951
|
+
? this._ngZone.runOutsideAngular(setupMouseMove)
|
|
952
|
+
: setupMouseMove();
|
|
948
953
|
}
|
|
949
954
|
/**
|
|
950
955
|
* Check if the header text length goes over the column width. In such case applies text truncation with
|
|
@@ -989,7 +994,7 @@ class PlatformTableCellResizableDirective extends TableCellDirective {
|
|
|
989
994
|
optional: true
|
|
990
995
|
});
|
|
991
996
|
/** @hidden */
|
|
992
|
-
this.
|
|
997
|
+
this._ngZone = inject(NgZone, { optional: true });
|
|
993
998
|
}
|
|
994
999
|
/** First column can be resized only by its end */
|
|
995
1000
|
set resizableSide(value) {
|
|
@@ -1000,17 +1005,23 @@ class PlatformTableCellResizableDirective extends TableCellDirective {
|
|
|
1000
1005
|
}
|
|
1001
1006
|
/** @hidden */
|
|
1002
1007
|
ngOnInit() {
|
|
1003
|
-
|
|
1008
|
+
const setupMouseMove = () => {
|
|
1004
1009
|
fromEvent(this.elementRef.nativeElement, 'mousemove')
|
|
1005
1010
|
.pipe(filter(() => this._tableColumnResizeService?.resizeInProgress !== true), debounceTime(5), map((event) => this._getResizer(event) || { resizerPosition: 0, resizedColumn: this.columnName }), takeUntilDestroyed(this._destroyRef))
|
|
1006
1011
|
.subscribe((data) => {
|
|
1007
1012
|
this._tableColumnResizeService.setInitialResizerPosition(data.resizerPosition, data.resizedColumn);
|
|
1008
1013
|
});
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
+
};
|
|
1015
|
+
if (this._ngZone) {
|
|
1016
|
+
this._ngZone.runOutsideAngular(setupMouseMove);
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
setupMouseMove();
|
|
1020
|
+
}
|
|
1021
|
+
fromEvent(this.elementRef.nativeElement, 'focus')
|
|
1022
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
1023
|
+
.subscribe(() => {
|
|
1024
|
+
this._tableColumnResizeService.setInitialResizerPosition(0, this.columnName);
|
|
1014
1025
|
});
|
|
1015
1026
|
}
|
|
1016
1027
|
/** @hidden */
|
|
@@ -3265,8 +3276,6 @@ class TableHeaderResizerDirective {
|
|
|
3265
3276
|
/** @hidden */
|
|
3266
3277
|
this._tableRowService = inject(TableRowService);
|
|
3267
3278
|
/** @hidden */
|
|
3268
|
-
this._zone = inject(NgZone);
|
|
3269
|
-
/** @hidden */
|
|
3270
3279
|
this._document = inject(DOCUMENT);
|
|
3271
3280
|
}
|
|
3272
3281
|
/** @hidden */
|
|
@@ -3275,42 +3284,40 @@ class TableHeaderResizerDirective {
|
|
|
3275
3284
|
}
|
|
3276
3285
|
/** @hidden */
|
|
3277
3286
|
ngOnInit() {
|
|
3278
|
-
this.
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
this.
|
|
3312
|
-
this.focusedCellPosition = null;
|
|
3313
|
-
});
|
|
3287
|
+
fromEvent(this._elmRef.nativeElement, 'keydown')
|
|
3288
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
3289
|
+
.subscribe((event) => {
|
|
3290
|
+
if ((KeyUtil.isKeyCode(event, LEFT_ARROW) ||
|
|
3291
|
+
(this._isRtl() && KeyUtil.isKeyCode(event, RIGHT_ARROW))) &&
|
|
3292
|
+
event.shiftKey &&
|
|
3293
|
+
this._headerCellFocused) {
|
|
3294
|
+
this._tableColumnResizeService._processResize(-32);
|
|
3295
|
+
event.preventDefault();
|
|
3296
|
+
event.stopImmediatePropagation();
|
|
3297
|
+
}
|
|
3298
|
+
else if ((KeyUtil.isKeyCode(event, RIGHT_ARROW) ||
|
|
3299
|
+
(this._isRtl() && KeyUtil.isKeyCode(event, LEFT_ARROW))) &&
|
|
3300
|
+
event.shiftKey &&
|
|
3301
|
+
this._headerCellFocused) {
|
|
3302
|
+
this._tableColumnResizeService._processResize(32);
|
|
3303
|
+
event.preventDefault();
|
|
3304
|
+
event.stopImmediatePropagation();
|
|
3305
|
+
}
|
|
3306
|
+
});
|
|
3307
|
+
fromEvent(this._elmRef.nativeElement, 'focusin')
|
|
3308
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
3309
|
+
.subscribe(() => {
|
|
3310
|
+
if (!this._focusinTimerId) {
|
|
3311
|
+
return;
|
|
3312
|
+
}
|
|
3313
|
+
clearTimeout(this._focusinTimerId);
|
|
3314
|
+
this._focusinTimerId = null;
|
|
3315
|
+
});
|
|
3316
|
+
fromEvent(this._elmRef.nativeElement, 'focusout')
|
|
3317
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
3318
|
+
.subscribe(() => {
|
|
3319
|
+
this._focusinTimerId = setTimeout(() => {
|
|
3320
|
+
this.focusedCellPosition = null;
|
|
3314
3321
|
});
|
|
3315
3322
|
});
|
|
3316
3323
|
this._tableRowService.cellFocused$.subscribe((evt) => {
|
|
@@ -3502,10 +3509,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3502
3509
|
*/
|
|
3503
3510
|
class TableScrollableDirective {
|
|
3504
3511
|
/** @hidden */
|
|
3505
|
-
constructor(elementRef, scrollDispatcher
|
|
3512
|
+
constructor(elementRef, scrollDispatcher) {
|
|
3506
3513
|
this.elementRef = elementRef;
|
|
3507
3514
|
this.scrollDispatcher = scrollDispatcher;
|
|
3508
|
-
this.ngZone = ngZone;
|
|
3509
3515
|
/** @hidden */
|
|
3510
3516
|
this._skipEvent = false;
|
|
3511
3517
|
/** @hidden */
|
|
@@ -3516,9 +3522,12 @@ class TableScrollableDirective {
|
|
|
3516
3522
|
this._destroyRef = inject(DestroyRef);
|
|
3517
3523
|
/** @hidden */
|
|
3518
3524
|
this._document = inject(DOCUMENT);
|
|
3525
|
+
/** @hidden */
|
|
3526
|
+
this._ngZone = inject(NgZone, { optional: true });
|
|
3519
3527
|
/** Scroll events stream */
|
|
3520
3528
|
this._elementScrollStream = new Observable((observer) => {
|
|
3521
|
-
const
|
|
3529
|
+
const subscribeToScroll = () => fromEvent(this.elementRef.nativeElement, 'scroll').subscribe(observer);
|
|
3530
|
+
const subscription = this._ngZone ? this._ngZone.runOutsideAngular(subscribeToScroll) : subscribeToScroll();
|
|
3522
3531
|
return () => subscription.unsubscribe();
|
|
3523
3532
|
}).pipe(filter(() => {
|
|
3524
3533
|
if (this._skipEvent) {
|
|
@@ -3624,13 +3633,19 @@ class TableScrollableDirective {
|
|
|
3624
3633
|
}
|
|
3625
3634
|
/** Set Scroll Position during component initialization. */
|
|
3626
3635
|
initializeScrollTop(scrollTop) {
|
|
3627
|
-
|
|
3636
|
+
const setScrollTimeout = () => {
|
|
3628
3637
|
setTimeout(() => {
|
|
3629
3638
|
this.setScrollTop(scrollTop, false);
|
|
3630
3639
|
});
|
|
3631
|
-
}
|
|
3640
|
+
};
|
|
3641
|
+
if (this._ngZone) {
|
|
3642
|
+
this._ngZone.runOutsideAngular(setScrollTimeout);
|
|
3643
|
+
}
|
|
3644
|
+
else {
|
|
3645
|
+
setScrollTimeout();
|
|
3646
|
+
}
|
|
3632
3647
|
}
|
|
3633
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableScrollableDirective, deps: [{ token: i0.ElementRef }, { token: TableScrollDispatcherService }
|
|
3648
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableScrollableDirective, deps: [{ token: i0.ElementRef }, { token: TableScrollDispatcherService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3634
3649
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: TableScrollableDirective, isStandalone: true, selector: "[fdpTableScrollable]", providers: [{ provide: TABLE_SCROLLABLE, useExisting: forwardRef(() => TableScrollableDirective) }], exportAs: ["tableScrollable"], ngImport: i0 }); }
|
|
3635
3650
|
}
|
|
3636
3651
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableScrollableDirective, decorators: [{
|
|
@@ -3641,7 +3656,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3641
3656
|
standalone: true,
|
|
3642
3657
|
providers: [{ provide: TABLE_SCROLLABLE, useExisting: forwardRef(() => TableScrollableDirective) }]
|
|
3643
3658
|
}]
|
|
3644
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: TableScrollDispatcherService }
|
|
3659
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: TableScrollDispatcherService }] });
|
|
3645
3660
|
|
|
3646
3661
|
class FdpViewSettingsFilterCustomDef {
|
|
3647
3662
|
/** @hidden */
|