@acorex/components 22.4.0 → 22.4.2
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/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/components",
|
|
3
|
-
"version": "22.4.
|
|
3
|
+
"version": "22.4.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "22.4.
|
|
6
|
-
"@acorex/cdk": "22.4.
|
|
5
|
+
"@acorex/core": "22.4.2",
|
|
6
|
+
"@acorex/cdk": "22.4.2",
|
|
7
7
|
"@angular/aria": ">=22.1.0",
|
|
8
8
|
"polytype": ">=0.17.0",
|
|
9
9
|
"hammerjs": ">=2.0.8",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i2 from '@acorex/cdk/common';
|
|
2
2
|
import { AXSortOrder, MXBaseComponent, AXDataSource, AXStyleColorType, AXEvent, AXButtonClickEvent, AXStyleLookType, AXClickEvent, AXItemClickEvent, AXValueChangedEvent } from '@acorex/cdk/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { QueryList, TemplateRef, EventEmitter, WritableSignal, ChangeDetectorRef, OnInit, AfterViewInit, Signal } from '@angular/core';
|
|
4
|
+
import { QueryList, TemplateRef, EventEmitter, WritableSignal, DestroyRef, ChangeDetectorRef, OnInit, AfterViewInit, Signal } from '@angular/core';
|
|
5
5
|
import * as i11 from '@acorex/core/format';
|
|
6
6
|
import { AXFormatOptions } from '@acorex/core/format';
|
|
7
7
|
import * as i8 from '@acorex/components/button';
|
|
@@ -44,6 +44,10 @@ declare abstract class AXDataTableColumnComponent {
|
|
|
44
44
|
effectiveFixed: 'start' | 'end' | undefined;
|
|
45
45
|
get isBand(): boolean;
|
|
46
46
|
getLeafColumns(): AXDataTableColumnComponent[];
|
|
47
|
+
/**
|
|
48
|
+
* Column used for multi-level header layout. Single-child bands are skipped so the child is promoted.
|
|
49
|
+
*/
|
|
50
|
+
getHeaderColumn(): AXDataTableColumnComponent;
|
|
47
51
|
getHeaderDepth(): number;
|
|
48
52
|
abstract get renderCellTemplate(): TemplateRef<unknown>;
|
|
49
53
|
abstract get renderHeaderTemplate(): TemplateRef<unknown>;
|
|
@@ -170,7 +174,7 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
|
|
|
170
174
|
private readonly cellCssClassCache;
|
|
171
175
|
private readonly highlightService;
|
|
172
176
|
private readonly platformId;
|
|
173
|
-
|
|
177
|
+
protected readonly destroyRef: DestroyRef;
|
|
174
178
|
private _highlightText?;
|
|
175
179
|
private highlightOrder;
|
|
176
180
|
private textHighlightFrame?;
|
|
@@ -489,6 +493,13 @@ declare abstract class AXBaseRowCommandColumnComponent extends AXDataTableColumn
|
|
|
489
493
|
allowSorting: boolean;
|
|
490
494
|
get loadingEnabled(): boolean;
|
|
491
495
|
get cssClass(): string;
|
|
496
|
+
/**
|
|
497
|
+
* Command cells already include their own padding in measurement.
|
|
498
|
+
* Extra fit padding would leave empty space around the icon buttons.
|
|
499
|
+
*/
|
|
500
|
+
get autoFitPadding(): number;
|
|
501
|
+
/** One icon button plus the command cell's horizontal padding. */
|
|
502
|
+
get minAutoWidth(): number;
|
|
492
503
|
protected resolveCommandId(rowData: unknown, commandName: string): string;
|
|
493
504
|
protected setCommandLoadingState(commandId: string, loading: boolean): void;
|
|
494
505
|
onItemClick: EventEmitter<AXRowCommandItemClickEvent>;
|
|
@@ -535,8 +546,6 @@ declare class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumn
|
|
|
535
546
|
* Returns the name identifier for the column component.
|
|
536
547
|
*/
|
|
537
548
|
get name(): string;
|
|
538
|
-
get autoFitPadding(): number;
|
|
539
|
-
get minAutoWidth(): number;
|
|
540
549
|
/**
|
|
541
550
|
* @ignore
|
|
542
551
|
*/
|
|
@@ -860,8 +869,10 @@ interface DataTableBandHeaderCell {
|
|
|
860
869
|
colspan: number;
|
|
861
870
|
/** Index of the last leaf column covered by this band within the current header section. */
|
|
862
871
|
endLeafIndex: number;
|
|
863
|
-
/**
|
|
872
|
+
/** Band column rendered in this header cell. */
|
|
864
873
|
column: AXDataTableColumnComponent;
|
|
874
|
+
/** Top-level column for drag-reorder on the first header row; otherwise the rendered column. */
|
|
875
|
+
ownerColumn: AXDataTableColumnComponent;
|
|
865
876
|
}
|
|
866
877
|
interface DataTableLeafHeaderCell {
|
|
867
878
|
type: 'leaf';
|
|
@@ -869,6 +880,8 @@ interface DataTableLeafHeaderCell {
|
|
|
869
880
|
rowspan: number;
|
|
870
881
|
/** Leaf column index within the current header section. */
|
|
871
882
|
endLeafIndex: number;
|
|
883
|
+
/** Top-level column for drag-reorder on the first header row; otherwise the rendered column. */
|
|
884
|
+
ownerColumn: AXDataTableColumnComponent;
|
|
872
885
|
}
|
|
873
886
|
interface DataTableGapHeaderCell {
|
|
874
887
|
type: 'gap';
|
|
@@ -971,10 +984,24 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
971
984
|
*/
|
|
972
985
|
protected normalColumnsList: Signal<AXDataTableColumnComponent[]>;
|
|
973
986
|
/**
|
|
974
|
-
* True when a text column owns the tree expander.
|
|
975
|
-
*
|
|
987
|
+
* True when a text column owns the tree expander. Leftover table space is added
|
|
988
|
+
* to that column for nested indent. Its content width is a minimum, so the table
|
|
989
|
+
* scrolls horizontally instead of collapsing the column.
|
|
976
990
|
*/
|
|
977
991
|
protected hasTreeFillColumn: Signal<boolean>;
|
|
992
|
+
/**
|
|
993
|
+
* Pixel width of the table. At least the sum of column content widths, and at least
|
|
994
|
+
* the wrapper width so a short table still fills the container.
|
|
995
|
+
*
|
|
996
|
+
* @ignore
|
|
997
|
+
*/
|
|
998
|
+
protected readonly tableWidth: WritableSignal<string>;
|
|
999
|
+
/**
|
|
1000
|
+
* Minimum table width in pixels. Wider than the wrapper, this produces horizontal scroll.
|
|
1001
|
+
*
|
|
1002
|
+
* @ignore
|
|
1003
|
+
*/
|
|
1004
|
+
protected readonly tableMinWidth: WritableSignal<string>;
|
|
978
1005
|
/**
|
|
979
1006
|
* @ignore
|
|
980
1007
|
*/
|
|
@@ -1065,6 +1092,19 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
1065
1092
|
* @ignore
|
|
1066
1093
|
*/
|
|
1067
1094
|
private userResizedColumns;
|
|
1095
|
+
/**
|
|
1096
|
+
* Content width of tree-expander columns. Used as a floor so those columns are not
|
|
1097
|
+
* squeezed when the other columns are wider than the wrapper.
|
|
1098
|
+
* @ignore
|
|
1099
|
+
*/
|
|
1100
|
+
private treeFillContentWidths;
|
|
1101
|
+
/**
|
|
1102
|
+
* Rendered width of tree-expander columns: content width, plus leftover wrapper space.
|
|
1103
|
+
* @ignore
|
|
1104
|
+
*/
|
|
1105
|
+
private readonly treeFillResolvedWidths;
|
|
1106
|
+
/** @ignore */
|
|
1107
|
+
private resizeObserver;
|
|
1068
1108
|
/**
|
|
1069
1109
|
* @ignore
|
|
1070
1110
|
*/
|
|
@@ -1243,7 +1283,7 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
1243
1283
|
ngAfterViewInit(): void;
|
|
1244
1284
|
private captureAutoFitIntentColumns;
|
|
1245
1285
|
/**
|
|
1246
|
-
* Tree expand columns
|
|
1286
|
+
* Tree expand columns keep a content minimum and grow into leftover table space for nested indent.
|
|
1247
1287
|
*/
|
|
1248
1288
|
private isTreeFillColumn;
|
|
1249
1289
|
/**
|
|
@@ -1394,6 +1434,37 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
1394
1434
|
* @param columnIndex - 0-based index in the columns `QueryList`.
|
|
1395
1435
|
*/
|
|
1396
1436
|
autoFitColumn(columnIndex: number, options?: AXDataTableAutoFitColumnOptions): void;
|
|
1437
|
+
/**
|
|
1438
|
+
* Measures a column's content width without writing it back.
|
|
1439
|
+
* Tree-expander columns use the result as a minimum so they can still grow.
|
|
1440
|
+
*/
|
|
1441
|
+
private measureColumnContentWidth;
|
|
1442
|
+
private isCommandColumn;
|
|
1443
|
+
/**
|
|
1444
|
+
* Command buttons are a fixed icon size inside the table. Cloning them outside
|
|
1445
|
+
* `ax-data-table` drops that size and measures default button padding instead.
|
|
1446
|
+
* Read the live controls, then add the cell's own horizontal padding and border.
|
|
1447
|
+
*/
|
|
1448
|
+
private measureCommandColumnWidth;
|
|
1449
|
+
private readCommandControlsWidth;
|
|
1450
|
+
/** Horizontal padding and borders already painted inside the command cell. */
|
|
1451
|
+
private readCommandCellChrome;
|
|
1452
|
+
/** Lets cloned header/cells report their text width instead of the collapsed column width. */
|
|
1453
|
+
private prepareMeasuredCell;
|
|
1454
|
+
/**
|
|
1455
|
+
* Stores the content width of tree-expander columns, including visible nested indent.
|
|
1456
|
+
*/
|
|
1457
|
+
private measureTreeFillColumns;
|
|
1458
|
+
/** Deepest visible nested-row indent, which content measurement does not include. */
|
|
1459
|
+
private readTreeIndentPadding;
|
|
1460
|
+
private readPixelWidth;
|
|
1461
|
+
/**
|
|
1462
|
+
* Sizes the table to the sum of column widths so columns keep their content width
|
|
1463
|
+
* and the wrapper scrolls horizontally when that sum exceeds the container.
|
|
1464
|
+
* Tree-expander columns receive any leftover container width.
|
|
1465
|
+
*/
|
|
1466
|
+
private updateColumnLayoutWidths;
|
|
1467
|
+
private observeTableWrapper;
|
|
1397
1468
|
/**
|
|
1398
1469
|
* Auto-fits a single column by its `name` / data field.
|
|
1399
1470
|
*/
|