@anguless/angulux 22.6.6 → 22.6.8
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/README.md +12 -9
- package/fesm2022/anguless-angulux-autofocus.mjs +2 -2
- package/fesm2022/anguless-angulux-autofocus.mjs.map +1 -1
- package/fesm2022/anguless-angulux-confirmdialog.mjs +9 -3
- package/fesm2022/anguless-angulux-confirmdialog.mjs.map +1 -1
- package/fesm2022/anguless-angulux-dialog.mjs +2 -2
- package/fesm2022/anguless-angulux-dialog.mjs.map +1 -1
- package/fesm2022/anguless-angulux-dom.mjs +240 -155
- package/fesm2022/anguless-angulux-dom.mjs.map +1 -1
- package/fesm2022/anguless-angulux-fileupload.mjs +13 -1
- package/fesm2022/anguless-angulux-fileupload.mjs.map +1 -1
- package/fesm2022/anguless-angulux-menu.mjs +2 -2
- package/fesm2022/anguless-angulux-menu.mjs.map +1 -1
- package/fesm2022/anguless-angulux-motion.mjs +17 -0
- package/fesm2022/anguless-angulux-motion.mjs.map +1 -1
- package/fesm2022/anguless-angulux-multiselect.mjs +5 -5
- package/fesm2022/anguless-angulux-multiselect.mjs.map +1 -1
- package/fesm2022/anguless-angulux-overlay.mjs +10 -6
- package/fesm2022/anguless-angulux-overlay.mjs.map +1 -1
- package/fesm2022/anguless-angulux-password.mjs +2 -2
- package/fesm2022/anguless-angulux-password.mjs.map +1 -1
- package/fesm2022/anguless-angulux-progressbar.mjs +8 -3
- package/fesm2022/anguless-angulux-progressbar.mjs.map +1 -1
- package/fesm2022/anguless-angulux-table.mjs +73 -75
- package/fesm2022/anguless-angulux-table.mjs.map +1 -1
- package/fesm2022/anguless-angulux-tieredmenu.mjs +2 -2
- package/fesm2022/anguless-angulux-tieredmenu.mjs.map +1 -1
- package/fesm2022/anguless-angulux-toast.mjs +14 -1
- package/fesm2022/anguless-angulux-toast.mjs.map +1 -1
- package/fesm2022/anguless-angulux-treetable.mjs +4 -3
- package/fesm2022/anguless-angulux-treetable.mjs.map +1 -1
- package/fesm2022/anguless-angulux-utils.mjs +32 -12
- package/fesm2022/anguless-angulux-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/anguless-angulux-confirmdialog.d.ts +4 -0
- package/types/anguless-angulux-dom.d.ts +36 -2
- package/types/anguless-angulux-fileupload.d.ts +1 -2
- package/types/anguless-angulux-table.d.ts +2 -2
- package/types/anguless-angulux-toast.d.ts +1 -2
- package/types/anguless-angulux-utils.d.ts +5 -2
|
@@ -20,7 +20,7 @@ import * as i8 from '@anguless/angulux/checkbox';
|
|
|
20
20
|
import { CheckboxModule } from '@anguless/angulux/checkbox';
|
|
21
21
|
import * as i13 from '@anguless/angulux/datepicker';
|
|
22
22
|
import { DatePickerModule } from '@anguless/angulux/datepicker';
|
|
23
|
-
import {
|
|
23
|
+
import { ɵclearSelection as _clearSelection, ɵfind as _find, ɵremoveClass as _removeClass, ɵgetOffset as _getOffset, ɵaddClass as _addClass, ɵfindSingle as _findSingle, ɵgetOuterWidth as _getOuterWidth, ɵgetHiddenElementOuterWidth as _getHiddenElementOuterWidth, ɵgetHiddenElementOuterHeight as _getHiddenElementOuterHeight, ɵindexWithinGroup as _indexWithinGroup, ɵindex as _index, ɵgetOuterHeight as _getOuterHeight, ɵsetAttribute as _setAttribute, ɵsiblings as _siblings, ɵgetAttribute as _getAttribute, ɵfocus as _focus, ɵinvokeElementMethod as _invokeElementMethod, ɵgetFocusableElements as _getFocusableElements, ɵgetFirstFocusableElement as _getFirstFocusableElement, ɵisTouchDevice as _isTouchDevice, ConnectedOverlayScrollHandler } from '@anguless/angulux/dom';
|
|
24
24
|
import { ArrowDownIcon } from '@anguless/angulux/icons/arrowdown';
|
|
25
25
|
import { ArrowUpIcon } from '@anguless/angulux/icons/arrowup';
|
|
26
26
|
import { FilterIcon } from '@anguless/angulux/icons/filter';
|
|
@@ -1732,7 +1732,7 @@ class Table extends BaseComponent {
|
|
|
1732
1732
|
let rowIndex = event.rowIndex;
|
|
1733
1733
|
this.preventSelectionSetterPropagation = true;
|
|
1734
1734
|
if (this.isMultipleSelectionMode() && event.originalEvent.shiftKey && this.anchorRowIndex != null) {
|
|
1735
|
-
|
|
1735
|
+
_clearSelection();
|
|
1736
1736
|
if (this.rangeRowIndex != null) {
|
|
1737
1737
|
this.clearSelectionRange(event.originalEvent);
|
|
1738
1738
|
}
|
|
@@ -2473,13 +2473,13 @@ class Table extends BaseComponent {
|
|
|
2473
2473
|
this.bindDocumentEditListener();
|
|
2474
2474
|
}
|
|
2475
2475
|
isEditingCellValid() {
|
|
2476
|
-
return this.editingCell &&
|
|
2476
|
+
return this.editingCell && _find(this.editingCell, '.ng-invalid.ng-dirty').length === 0;
|
|
2477
2477
|
}
|
|
2478
2478
|
bindDocumentEditListener() {
|
|
2479
2479
|
if (!this.documentEditListener) {
|
|
2480
2480
|
this.documentEditListener = this.renderer.listen(this.document, 'click', (event) => {
|
|
2481
2481
|
if (this.editingCell && !this.selfClick && this.isEditingCellValid()) {
|
|
2482
|
-
!this.$unstyled() &&
|
|
2482
|
+
!this.$unstyled() && _removeClass(this.editingCell, 'p-cell-editing');
|
|
2483
2483
|
setAttribute(this.editingCell, 'data-p-cell-editing', 'false');
|
|
2484
2484
|
this.editingCell = null;
|
|
2485
2485
|
this.onEditComplete.emit({
|
|
@@ -2512,7 +2512,7 @@ class Table extends BaseComponent {
|
|
|
2512
2512
|
this.editingRowKeys[dataKeyValue] = true;
|
|
2513
2513
|
}
|
|
2514
2514
|
saveRowEdit(rowData, rowElement) {
|
|
2515
|
-
if (
|
|
2515
|
+
if (_find(rowElement, '.ng-invalid.ng-dirty').length === 0) {
|
|
2516
2516
|
let dataKeyValue = String(ObjectUtils.resolveFieldData(rowData, this.dataKey));
|
|
2517
2517
|
delete this.editingRowKeys[dataKeyValue];
|
|
2518
2518
|
}
|
|
@@ -2563,7 +2563,7 @@ class Table extends BaseComponent {
|
|
|
2563
2563
|
return this.selectionMode === 'multiple';
|
|
2564
2564
|
}
|
|
2565
2565
|
onColumnResizeBegin(event) {
|
|
2566
|
-
let containerLeft =
|
|
2566
|
+
let containerLeft = _getOffset(this.el?.nativeElement).left;
|
|
2567
2567
|
this.resizeColumnElement = event.target.closest('th');
|
|
2568
2568
|
this.columnResizing = true;
|
|
2569
2569
|
if (event.type == 'touchstart') {
|
|
@@ -2576,8 +2576,8 @@ class Table extends BaseComponent {
|
|
|
2576
2576
|
event.preventDefault();
|
|
2577
2577
|
}
|
|
2578
2578
|
onColumnResize(event) {
|
|
2579
|
-
let containerLeft =
|
|
2580
|
-
!this.$unstyled() &&
|
|
2579
|
+
let containerLeft = _getOffset(this.el?.nativeElement).left;
|
|
2580
|
+
!this.$unstyled() && _addClass(this.el?.nativeElement, 'p-unselectable-text');
|
|
2581
2581
|
this.resizeHelperViewChild.nativeElement.style.height = this.el?.nativeElement.offsetHeight + 'px';
|
|
2582
2582
|
this.resizeHelperViewChild.nativeElement.style.top = 0 + 'px';
|
|
2583
2583
|
if (event.type == 'touchmove') {
|
|
@@ -2619,29 +2619,27 @@ class Table extends BaseComponent {
|
|
|
2619
2619
|
}
|
|
2620
2620
|
}
|
|
2621
2621
|
this.resizeHelperViewChild.nativeElement.style.display = 'none';
|
|
2622
|
-
|
|
2622
|
+
_removeClass(this.el?.nativeElement, 'p-unselectable-text');
|
|
2623
2623
|
}
|
|
2624
2624
|
_totalTableWidth() {
|
|
2625
2625
|
let widths = [];
|
|
2626
|
-
const tableHead =
|
|
2627
|
-
let headers =
|
|
2628
|
-
headers.forEach((header) => widths.push(
|
|
2626
|
+
const tableHead = _findSingle(this.el.nativeElement, '[data-pc-section="thead"]');
|
|
2627
|
+
let headers = _find(tableHead, 'tr > th');
|
|
2628
|
+
headers.forEach((header) => widths.push(_getOuterWidth(header)));
|
|
2629
2629
|
return widths;
|
|
2630
2630
|
}
|
|
2631
2631
|
onColumnDragStart(event, columnElement) {
|
|
2632
|
-
this.reorderIconWidth =
|
|
2633
|
-
this.reorderIconHeight =
|
|
2632
|
+
this.reorderIconWidth = _getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement);
|
|
2633
|
+
this.reorderIconHeight = _getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement);
|
|
2634
2634
|
this.draggedColumn = columnElement;
|
|
2635
2635
|
event.dataTransfer.setData('text', 'b'); // For firefox
|
|
2636
2636
|
}
|
|
2637
2637
|
onColumnDragEnter(event, dropHeader) {
|
|
2638
2638
|
if (this.reorderableColumns && this.draggedColumn && dropHeader) {
|
|
2639
2639
|
event.preventDefault();
|
|
2640
|
-
let containerOffset =
|
|
2641
|
-
let dropHeaderOffset =
|
|
2640
|
+
let containerOffset = _getOffset(this.el?.nativeElement);
|
|
2641
|
+
let dropHeaderOffset = _getOffset(dropHeader);
|
|
2642
2642
|
if (this.draggedColumn != dropHeader) {
|
|
2643
|
-
let dragIndex = DomHandler.indexWithinGroup(this.draggedColumn, 'preorderablecolumn');
|
|
2644
|
-
let dropIndex = DomHandler.indexWithinGroup(dropHeader, 'preorderablecolumn');
|
|
2645
2643
|
let targetLeft = dropHeaderOffset.left - containerOffset.left;
|
|
2646
2644
|
let targetTop = containerOffset.top - dropHeaderOffset.top;
|
|
2647
2645
|
let columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2;
|
|
@@ -2673,8 +2671,8 @@ class Table extends BaseComponent {
|
|
|
2673
2671
|
onColumnDrop(event, dropColumn) {
|
|
2674
2672
|
event.preventDefault();
|
|
2675
2673
|
if (this.draggedColumn) {
|
|
2676
|
-
let dragIndex =
|
|
2677
|
-
let dropIndex =
|
|
2674
|
+
let dragIndex = _indexWithinGroup(this.draggedColumn, 'preorderablecolumn');
|
|
2675
|
+
let dropIndex = _indexWithinGroup(dropColumn, 'preorderablecolumn');
|
|
2678
2676
|
let allowDrop = dragIndex != dropIndex;
|
|
2679
2677
|
if (allowDrop && ((dropIndex - dragIndex == 1 && this.dropPosition === -1) || (dragIndex - dropIndex == 1 && this.dropPosition === 1))) {
|
|
2680
2678
|
allowDrop = false;
|
|
@@ -2713,7 +2711,7 @@ class Table extends BaseComponent {
|
|
|
2713
2711
|
}
|
|
2714
2712
|
}
|
|
2715
2713
|
resizeTableCells(newColumnWidth, nextColumnWidth) {
|
|
2716
|
-
let colIndex =
|
|
2714
|
+
let colIndex = _index(this.resizeColumnElement);
|
|
2717
2715
|
let width = this.columnResizeMode === 'expand' ? this._initialColWidths : this._totalTableWidth();
|
|
2718
2716
|
this.updateStyleElement(width, colIndex, newColumnWidth, nextColumnWidth);
|
|
2719
2717
|
}
|
|
@@ -2741,35 +2739,35 @@ class Table extends BaseComponent {
|
|
|
2741
2739
|
}
|
|
2742
2740
|
onRowDragOver(event, index, rowElement) {
|
|
2743
2741
|
if (this.rowDragging && this.draggedRowIndex !== index) {
|
|
2744
|
-
let rowY =
|
|
2742
|
+
let rowY = _getOffset(rowElement).top;
|
|
2745
2743
|
let pageY = event.pageY;
|
|
2746
|
-
let rowMidY = rowY +
|
|
2744
|
+
let rowMidY = rowY + _getOuterHeight(rowElement) / 2;
|
|
2747
2745
|
let prevRowElement = rowElement.previousElementSibling;
|
|
2748
2746
|
if (pageY < rowMidY) {
|
|
2749
|
-
|
|
2747
|
+
_removeClass(rowElement, 'p-datatable-dragpoint-bottom');
|
|
2750
2748
|
this.droppedRowIndex = index;
|
|
2751
2749
|
if (prevRowElement && !this.$unstyled())
|
|
2752
|
-
|
|
2750
|
+
_addClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
2753
2751
|
else
|
|
2754
|
-
!this.$unstyled() &&
|
|
2752
|
+
!this.$unstyled() && _addClass(rowElement, 'p-datatable-dragpoint-top');
|
|
2755
2753
|
}
|
|
2756
2754
|
else {
|
|
2757
2755
|
if (prevRowElement && !this.$unstyled())
|
|
2758
|
-
|
|
2756
|
+
_removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
2759
2757
|
else
|
|
2760
|
-
!this.$unstyled() &&
|
|
2758
|
+
!this.$unstyled() && _addClass(rowElement, 'p-datatable-dragpoint-top');
|
|
2761
2759
|
this.droppedRowIndex = index + 1;
|
|
2762
|
-
!this.$unstyled() &&
|
|
2760
|
+
!this.$unstyled() && _addClass(rowElement, 'p-datatable-dragpoint-bottom');
|
|
2763
2761
|
}
|
|
2764
2762
|
}
|
|
2765
2763
|
}
|
|
2766
2764
|
onRowDragLeave(event, rowElement) {
|
|
2767
2765
|
let prevRowElement = rowElement.previousElementSibling;
|
|
2768
2766
|
if (prevRowElement) {
|
|
2769
|
-
!this.$unstyled() &&
|
|
2767
|
+
!this.$unstyled() && _removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
2770
2768
|
}
|
|
2771
|
-
!this.$unstyled() &&
|
|
2772
|
-
!this.$unstyled() &&
|
|
2769
|
+
!this.$unstyled() && _removeClass(rowElement, 'p-datatable-dragpoint-bottom');
|
|
2770
|
+
!this.$unstyled() && _removeClass(rowElement, 'p-datatable-dragpoint-top');
|
|
2773
2771
|
}
|
|
2774
2772
|
onRowDragEnd(event) {
|
|
2775
2773
|
this.rowDragging = false;
|
|
@@ -2913,12 +2911,12 @@ class Table extends BaseComponent {
|
|
|
2913
2911
|
let headers = [];
|
|
2914
2912
|
const container = this.el?.nativeElement;
|
|
2915
2913
|
if (container) {
|
|
2916
|
-
headers =
|
|
2914
|
+
headers = _find(container, '[data-pc-section="thead"] > tr > th');
|
|
2917
2915
|
}
|
|
2918
|
-
headers.forEach((header) => widths.push(
|
|
2916
|
+
headers.forEach((header) => widths.push(_getOuterWidth(header)));
|
|
2919
2917
|
state.columnWidths = widths.join(',');
|
|
2920
2918
|
if (this.columnResizeMode === 'expand' && this.tableViewChild) {
|
|
2921
|
-
state.tableWidth =
|
|
2919
|
+
state.tableWidth = _getOuterWidth(this.tableViewChild.nativeElement);
|
|
2922
2920
|
}
|
|
2923
2921
|
}
|
|
2924
2922
|
setResizeTableWidth(width) {
|
|
@@ -2992,9 +2990,9 @@ class Table extends BaseComponent {
|
|
|
2992
2990
|
createStyleElement() {
|
|
2993
2991
|
this.styleElement = this.renderer.createElement('style');
|
|
2994
2992
|
this.styleElement.type = 'text/css';
|
|
2995
|
-
|
|
2993
|
+
_setAttribute(this.styleElement, 'nonce', this.config?.csp()?.nonce);
|
|
2996
2994
|
this.renderer.appendChild(this.document.head, this.styleElement);
|
|
2997
|
-
|
|
2995
|
+
_setAttribute(this.styleElement, 'nonce', this.config?.csp()?.nonce);
|
|
2998
2996
|
}
|
|
2999
2997
|
getGroupRowsMeta() {
|
|
3000
2998
|
return { field: this.groupRowsBy, order: this.groupRowsByOrder };
|
|
@@ -3004,7 +3002,7 @@ class Table extends BaseComponent {
|
|
|
3004
3002
|
if (!this.responsiveStyleElement) {
|
|
3005
3003
|
this.responsiveStyleElement = this.renderer.createElement('style');
|
|
3006
3004
|
this.responsiveStyleElement.type = 'text/css';
|
|
3007
|
-
|
|
3005
|
+
_setAttribute(this.responsiveStyleElement, 'nonce', this.config?.csp()?.nonce);
|
|
3008
3006
|
this.renderer.appendChild(this.document.head, this.responsiveStyleElement);
|
|
3009
3007
|
let innerHTML = `
|
|
3010
3008
|
@media screen and (max-width: ${this.breakpoint}) {
|
|
@@ -3036,7 +3034,7 @@ class Table extends BaseComponent {
|
|
|
3036
3034
|
}
|
|
3037
3035
|
`;
|
|
3038
3036
|
this.renderer.setProperty(this.responsiveStyleElement, 'innerHTML', innerHTML);
|
|
3039
|
-
|
|
3037
|
+
_setAttribute(this.responsiveStyleElement, 'nonce', this.config?.csp()?.nonce);
|
|
3040
3038
|
}
|
|
3041
3039
|
}
|
|
3042
3040
|
}
|
|
@@ -3908,11 +3906,11 @@ class TableBody extends BaseComponent {
|
|
|
3908
3906
|
}
|
|
3909
3907
|
}
|
|
3910
3908
|
updateFrozenRowStickyPosition() {
|
|
3911
|
-
this.el.nativeElement.style.top =
|
|
3909
|
+
this.el.nativeElement.style.top = _getOuterHeight(this.el.nativeElement.previousElementSibling) + 'px';
|
|
3912
3910
|
}
|
|
3913
3911
|
updateFrozenRowGroupHeaderStickyPosition() {
|
|
3914
3912
|
if (this.el.nativeElement.previousElementSibling) {
|
|
3915
|
-
let tableHeaderHeight =
|
|
3913
|
+
let tableHeaderHeight = _getOuterHeight(this.el.nativeElement.previousElementSibling);
|
|
3916
3914
|
this.dataTable.rowGroupHeaderStyleObject.top = tableHeaderHeight + 'px';
|
|
3917
3915
|
}
|
|
3918
3916
|
}
|
|
@@ -4384,8 +4382,8 @@ class FrozenColumn extends BaseComponent {
|
|
|
4384
4382
|
}
|
|
4385
4383
|
}
|
|
4386
4384
|
recalculateColumns() {
|
|
4387
|
-
const siblings =
|
|
4388
|
-
const index =
|
|
4385
|
+
const siblings = _siblings(this.el.nativeElement);
|
|
4386
|
+
const index = _index(this.el.nativeElement);
|
|
4389
4387
|
const time = (siblings.length - index + 1) * 50;
|
|
4390
4388
|
setTimeout(() => {
|
|
4391
4389
|
this.updateStickyPosition();
|
|
@@ -4398,7 +4396,7 @@ class FrozenColumn extends BaseComponent {
|
|
|
4398
4396
|
let right = 0;
|
|
4399
4397
|
let sibling = this.el.nativeElement.nextElementSibling;
|
|
4400
4398
|
while (sibling) {
|
|
4401
|
-
right +=
|
|
4399
|
+
right += _getOuterWidth(sibling);
|
|
4402
4400
|
sibling = sibling.nextElementSibling;
|
|
4403
4401
|
}
|
|
4404
4402
|
this.el.nativeElement.style.right = right + 'px';
|
|
@@ -4407,14 +4405,14 @@ class FrozenColumn extends BaseComponent {
|
|
|
4407
4405
|
let left = 0;
|
|
4408
4406
|
let sibling = this.el.nativeElement.previousElementSibling;
|
|
4409
4407
|
while (sibling) {
|
|
4410
|
-
left +=
|
|
4408
|
+
left += _getOuterWidth(sibling);
|
|
4411
4409
|
sibling = sibling.previousElementSibling;
|
|
4412
4410
|
}
|
|
4413
4411
|
this.el.nativeElement.style.left = left + 'px';
|
|
4414
4412
|
}
|
|
4415
4413
|
const filterRow = this.el.nativeElement?.parentElement?.nextElementSibling;
|
|
4416
4414
|
if (filterRow) {
|
|
4417
|
-
let index =
|
|
4415
|
+
let index = _index(this.el.nativeElement);
|
|
4418
4416
|
if (filterRow.children && filterRow.children[index]) {
|
|
4419
4417
|
filterRow.children[index].style.left = this.el.nativeElement.style.left;
|
|
4420
4418
|
filterRow.children[index].style.right = this.el.nativeElement.style.right;
|
|
@@ -4491,7 +4489,7 @@ class SortableColumn extends BaseComponent {
|
|
|
4491
4489
|
originalEvent: event,
|
|
4492
4490
|
field: this.field
|
|
4493
4491
|
});
|
|
4494
|
-
|
|
4492
|
+
_clearSelection();
|
|
4495
4493
|
}
|
|
4496
4494
|
}
|
|
4497
4495
|
onEnterKey(event) {
|
|
@@ -4747,7 +4745,7 @@ class SelectableRow extends BaseComponent {
|
|
|
4747
4745
|
lastRow && this.focusRowChange(this.el.nativeElement, lastRow);
|
|
4748
4746
|
if (event.ctrlKey && event.shiftKey) {
|
|
4749
4747
|
const data = this.dataTable.dataToRender(this.dataTable.rows);
|
|
4750
|
-
const lastSelectableRowIndex =
|
|
4748
|
+
const lastSelectableRowIndex = _getAttribute(lastRow, 'index');
|
|
4751
4749
|
this.dataTable.anchorRowIndex = lastSelectableRowIndex;
|
|
4752
4750
|
this.dataTable.selection = data.slice(this.index || 0, data.length);
|
|
4753
4751
|
this.dataTable.selectRange(event, this.index || 0);
|
|
@@ -4759,7 +4757,7 @@ class SelectableRow extends BaseComponent {
|
|
|
4759
4757
|
firstRow && this.focusRowChange(this.el.nativeElement, firstRow);
|
|
4760
4758
|
if (event.ctrlKey && event.shiftKey) {
|
|
4761
4759
|
const data = this.dataTable.dataToRender(this.dataTable.rows);
|
|
4762
|
-
const firstSelectableRowIndex =
|
|
4760
|
+
const firstSelectableRowIndex = _getAttribute(firstRow, 'index');
|
|
4763
4761
|
this.dataTable.anchorRowIndex = this.dataTable.anchorRowIndex || firstSelectableRowIndex || 0;
|
|
4764
4762
|
this.dataTable.selection = data.slice(0, (this.index || 0) + 1);
|
|
4765
4763
|
this.dataTable.selectRange(event, this.index || 0);
|
|
@@ -4795,14 +4793,14 @@ class SelectableRow extends BaseComponent {
|
|
|
4795
4793
|
focusRowChange(firstFocusableRow, currentFocusedRow) {
|
|
4796
4794
|
firstFocusableRow.tabIndex = '-1';
|
|
4797
4795
|
currentFocusedRow.tabIndex = '0';
|
|
4798
|
-
|
|
4796
|
+
_focus(currentFocusedRow);
|
|
4799
4797
|
}
|
|
4800
4798
|
findLastSelectableRow() {
|
|
4801
|
-
const rows =
|
|
4799
|
+
const rows = _find(this.dataTable.el.nativeElement, '[data-p-selectable-row="true"]');
|
|
4802
4800
|
return rows ? rows[rows.length - 1] : null;
|
|
4803
4801
|
}
|
|
4804
4802
|
findFirstSelectableRow() {
|
|
4805
|
-
const firstRow =
|
|
4803
|
+
const firstRow = _findSingle(this.dataTable.el.nativeElement, '[data-p-selectable-row="true"]');
|
|
4806
4804
|
return firstRow;
|
|
4807
4805
|
}
|
|
4808
4806
|
findNextSelectableRow(row) {
|
|
@@ -5270,7 +5268,7 @@ class EditableColumn extends BaseComponent {
|
|
|
5270
5268
|
}
|
|
5271
5269
|
onAfterViewInit() {
|
|
5272
5270
|
if (this.isEnabled()) {
|
|
5273
|
-
!this.$unstyled() &&
|
|
5271
|
+
!this.$unstyled() && _addClass(this.el.nativeElement, 'p-editable-column');
|
|
5274
5272
|
}
|
|
5275
5273
|
}
|
|
5276
5274
|
onClick(event) {
|
|
@@ -5292,7 +5290,7 @@ class EditableColumn extends BaseComponent {
|
|
|
5292
5290
|
}
|
|
5293
5291
|
openCell() {
|
|
5294
5292
|
this.dataTable.updateEditingCell(this.el.nativeElement, this.data, this.field, this.rowIndex);
|
|
5295
|
-
!this.$unstyled() &&
|
|
5293
|
+
!this.$unstyled() && _addClass(this.el.nativeElement, 'p-cell-editing');
|
|
5296
5294
|
setAttribute(this.el.nativeElement, 'data-p-cell-editing', 'true');
|
|
5297
5295
|
this.dataTable.onEditInit.emit({
|
|
5298
5296
|
field: this.field,
|
|
@@ -5302,7 +5300,7 @@ class EditableColumn extends BaseComponent {
|
|
|
5302
5300
|
this.zone.runOutsideAngular(() => {
|
|
5303
5301
|
setTimeout(() => {
|
|
5304
5302
|
let focusCellSelector = this.aglFocusCellSelector || 'input, textarea, select';
|
|
5305
|
-
let focusableElement =
|
|
5303
|
+
let focusableElement = _findSingle(this.el.nativeElement, focusCellSelector);
|
|
5306
5304
|
if (focusableElement) {
|
|
5307
5305
|
focusableElement.focus();
|
|
5308
5306
|
}
|
|
@@ -5333,7 +5331,7 @@ class EditableColumn extends BaseComponent {
|
|
|
5333
5331
|
}
|
|
5334
5332
|
});
|
|
5335
5333
|
}
|
|
5336
|
-
!this.$unstyled() &&
|
|
5334
|
+
!this.$unstyled() && _removeClass(this.dataTable.editingCell, 'p-cell-editing');
|
|
5337
5335
|
setAttribute(this.el.nativeElement, 'data-p-cell-editing', 'false');
|
|
5338
5336
|
this.dataTable.editingCell = null;
|
|
5339
5337
|
this.dataTable.editingCellData = null;
|
|
@@ -5380,14 +5378,14 @@ class EditableColumn extends BaseComponent {
|
|
|
5380
5378
|
if (this.isEnabled()) {
|
|
5381
5379
|
let currentCell = this.findCell(event.target);
|
|
5382
5380
|
if (currentCell) {
|
|
5383
|
-
let cellIndex =
|
|
5381
|
+
let cellIndex = _index(currentCell);
|
|
5384
5382
|
let targetCell = this.findNextEditableColumnByIndex(currentCell, cellIndex);
|
|
5385
5383
|
if (targetCell) {
|
|
5386
5384
|
if (this.dataTable.isEditingCellValid()) {
|
|
5387
5385
|
this.closeEditingCell(true, event);
|
|
5388
5386
|
}
|
|
5389
|
-
|
|
5390
|
-
|
|
5387
|
+
_invokeElementMethod(event.target, 'blur');
|
|
5388
|
+
_invokeElementMethod(targetCell, 'click');
|
|
5391
5389
|
}
|
|
5392
5390
|
event.preventDefault();
|
|
5393
5391
|
}
|
|
@@ -5397,14 +5395,14 @@ class EditableColumn extends BaseComponent {
|
|
|
5397
5395
|
if (this.isEnabled()) {
|
|
5398
5396
|
let currentCell = this.findCell(event.target);
|
|
5399
5397
|
if (currentCell) {
|
|
5400
|
-
let cellIndex =
|
|
5398
|
+
let cellIndex = _index(currentCell);
|
|
5401
5399
|
let targetCell = this.findPrevEditableColumnByIndex(currentCell, cellIndex);
|
|
5402
5400
|
if (targetCell) {
|
|
5403
5401
|
if (this.dataTable.isEditingCellValid()) {
|
|
5404
5402
|
this.closeEditingCell(true, event);
|
|
5405
5403
|
}
|
|
5406
|
-
|
|
5407
|
-
|
|
5404
|
+
_invokeElementMethod(event.target, 'blur');
|
|
5405
|
+
_invokeElementMethod(targetCell, 'click');
|
|
5408
5406
|
}
|
|
5409
5407
|
event.preventDefault();
|
|
5410
5408
|
}
|
|
@@ -5440,8 +5438,8 @@ class EditableColumn extends BaseComponent {
|
|
|
5440
5438
|
if (this.dataTable.isEditingCellValid()) {
|
|
5441
5439
|
this.closeEditingCell(true, event);
|
|
5442
5440
|
}
|
|
5443
|
-
|
|
5444
|
-
|
|
5441
|
+
_invokeElementMethod(event.target, 'blur');
|
|
5442
|
+
_invokeElementMethod(targetCell, 'click');
|
|
5445
5443
|
event.preventDefault();
|
|
5446
5444
|
}
|
|
5447
5445
|
}
|
|
@@ -5454,8 +5452,8 @@ class EditableColumn extends BaseComponent {
|
|
|
5454
5452
|
if (this.dataTable.isEditingCellValid()) {
|
|
5455
5453
|
this.closeEditingCell(true, event);
|
|
5456
5454
|
}
|
|
5457
|
-
|
|
5458
|
-
|
|
5455
|
+
_invokeElementMethod(event.target, 'blur');
|
|
5456
|
+
_invokeElementMethod(targetCell, 'click');
|
|
5459
5457
|
event.preventDefault();
|
|
5460
5458
|
}
|
|
5461
5459
|
else {
|
|
@@ -5786,7 +5784,7 @@ class TableRadioButton extends BaseComponent {
|
|
|
5786
5784
|
}, this.value);
|
|
5787
5785
|
this.inputViewChild?.inputViewChild.nativeElement?.focus();
|
|
5788
5786
|
}
|
|
5789
|
-
|
|
5787
|
+
_clearSelection();
|
|
5790
5788
|
}
|
|
5791
5789
|
onDestroy() {
|
|
5792
5790
|
if (this.subscription) {
|
|
@@ -5847,7 +5845,7 @@ class TableCheckbox extends BaseComponent {
|
|
|
5847
5845
|
rowIndex: this.index() || 0
|
|
5848
5846
|
}, this.value);
|
|
5849
5847
|
}
|
|
5850
|
-
|
|
5848
|
+
_clearSelection();
|
|
5851
5849
|
}
|
|
5852
5850
|
onDestroy() {
|
|
5853
5851
|
if (this.subscription) {
|
|
@@ -5925,7 +5923,7 @@ class TableHeaderCheckbox extends BaseComponent {
|
|
|
5925
5923
|
this.dataTable.toggleRowsWithCheckbox(event, this.checked || false);
|
|
5926
5924
|
}
|
|
5927
5925
|
}
|
|
5928
|
-
|
|
5926
|
+
_clearSelection();
|
|
5929
5927
|
}
|
|
5930
5928
|
isDisabled() {
|
|
5931
5929
|
return this.disabled() || !this.dataTable.value || !this.dataTable.value.length;
|
|
@@ -5995,7 +5993,7 @@ class ReorderableRowHandle extends BaseComponent {
|
|
|
5995
5993
|
this.el = el;
|
|
5996
5994
|
}
|
|
5997
5995
|
onAfterViewInit() {
|
|
5998
|
-
//
|
|
5996
|
+
// ɵaddClass(this.el.nativeElement, 'p-datatable-reorderable-row-handle');
|
|
5999
5997
|
}
|
|
6000
5998
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ReorderableRowHandle, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6001
5999
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.2", type: ReorderableRowHandle, isStandalone: false, selector: "[aglReorderableRowHandle]", host: { properties: { "class": "cx('reorderableRowHandle')" } }, providers: [TableStyle], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
|
|
@@ -6526,14 +6524,14 @@ class ColumnFilter extends BaseComponent {
|
|
|
6526
6524
|
matchMode: this.getDefaultMatchMode(),
|
|
6527
6525
|
operator: this.getDefaultOperator()
|
|
6528
6526
|
});
|
|
6529
|
-
|
|
6527
|
+
_focus(this.clearButtonViewChild?.nativeElement);
|
|
6530
6528
|
}
|
|
6531
6529
|
removeConstraint(filterMeta) {
|
|
6532
6530
|
this.dataTable.filters[this.field] = this.dataTable.filters[this.field].filter((meta) => meta !== filterMeta);
|
|
6533
6531
|
if (!this.showApplyButton) {
|
|
6534
6532
|
this.dataTable._filter();
|
|
6535
6533
|
}
|
|
6536
|
-
|
|
6534
|
+
_focus(this.clearButtonViewChild?.nativeElement);
|
|
6537
6535
|
}
|
|
6538
6536
|
onOperatorChange(value) {
|
|
6539
6537
|
this.dataTable.filters[this.field].forEach((filterMeta) => {
|
|
@@ -6557,7 +6555,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6557
6555
|
break;
|
|
6558
6556
|
case 'ArrowDown':
|
|
6559
6557
|
if (this.overlayVisible) {
|
|
6560
|
-
let focusable =
|
|
6558
|
+
let focusable = _getFocusableElements(this.overlay);
|
|
6561
6559
|
if (focusable) {
|
|
6562
6560
|
focusable[0].focus();
|
|
6563
6561
|
}
|
|
@@ -6633,7 +6631,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6633
6631
|
}
|
|
6634
6632
|
focusOnFirstElement() {
|
|
6635
6633
|
if (this.overlay) {
|
|
6636
|
-
|
|
6634
|
+
_focus(_getFirstFocusableElement(this.overlay, ''));
|
|
6637
6635
|
}
|
|
6638
6636
|
}
|
|
6639
6637
|
getDefaultMatchMode() {
|
|
@@ -6702,7 +6700,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6702
6700
|
bindDocumentResizeListener() {
|
|
6703
6701
|
if (!this.documentResizeListener) {
|
|
6704
6702
|
this.documentResizeListener = this.renderer.listen(this.document.defaultView, 'resize', (event) => {
|
|
6705
|
-
if (this.overlayVisible && !
|
|
6703
|
+
if (this.overlayVisible && !_isTouchDevice()) {
|
|
6706
6704
|
this.hide();
|
|
6707
6705
|
}
|
|
6708
6706
|
});
|