@acorex/components 22.2.12 → 22.2.14

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.2.12",
3
+ "version": "22.2.14",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.2.12",
6
- "@acorex/cdk": "22.2.12",
5
+ "@acorex/core": "22.2.14",
6
+ "@acorex/cdk": "22.2.14",
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 { TemplateRef, EventEmitter, WritableSignal, ChangeDetectorRef, OnInit, AfterViewInit, Signal, QueryList } from '@angular/core';
4
+ import { QueryList, TemplateRef, EventEmitter, WritableSignal, 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';
@@ -39,6 +39,12 @@ declare abstract class AXDataTableColumnComponent {
39
39
  hasTitle: boolean;
40
40
  sortIndex: number | undefined;
41
41
  sortOrder: AXSortOrder | undefined;
42
+ childColumns: QueryList<AXDataTableColumnComponent>;
43
+ /** Set by the data table when this leaf sits under a fixed top-level band. */
44
+ effectiveFixed: 'start' | 'end' | undefined;
45
+ get isBand(): boolean;
46
+ getLeafColumns(): AXDataTableColumnComponent[];
47
+ getHeaderDepth(): number;
42
48
  abstract get renderCellTemplate(): TemplateRef<unknown>;
43
49
  abstract get renderHeaderTemplate(): TemplateRef<unknown>;
44
50
  abstract get renderFooterTemplate(): TemplateRef<unknown>;
@@ -46,7 +52,7 @@ declare abstract class AXDataTableColumnComponent {
46
52
  abstract get name(): string;
47
53
  get cssClass(): string | undefined;
48
54
  static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableColumnComponent, never>;
49
- static ɵprov: i0.ɵɵInjectableDeclaration<AXDataTableColumnComponent>;
55
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AXDataTableColumnComponent, never, never, { "caption": { "alias": "caption"; "required": false; }; "width": { "alias": "width"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "allowSorting": { "alias": "allowSorting"; "required": false; }; "allowResizing": { "alias": "allowResizing"; "required": false; }; "hasTitle": { "alias": "hasTitle"; "required": false; }; "sortIndex": { "alias": "sortIndex"; "required": false; }; "sortOrder": { "alias": "sortOrder"; "required": false; }; }, {}, ["childColumns"], never, true, never>;
50
56
  }
51
57
 
52
58
  type AXDataTableCssClassValue = string | null | undefined;
@@ -212,9 +218,13 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
212
218
  */
213
219
  getColumnHighlightColor(column: AXDataTableColumnComponent): AXDataTableRowColorType | null;
214
220
  /**
215
- * Returns column CSS classes for header and body cells (`cssClass` + temporary highlight).
221
+ * Returns the CSS class of a highlighted column, applied to its header and body cells.
216
222
  */
217
223
  getColumnCssClass(column: AXDataTableColumnComponent): string;
224
+ /**
225
+ * Header `<th>` classes: column highlight + column `cssClass` (e.g. `ax-select-column`).
226
+ */
227
+ getHeadColumnCssClass(column: AXDataTableColumnComponent): string;
218
228
  /**
219
229
  * Returns the temporary highlight state for a row, if any.
220
230
  */
@@ -456,7 +466,7 @@ declare class AXDataTableTextColumnComponent extends AXDataTableColumnComponent
456
466
  */
457
467
  formatOptions: AXFormatOptions;
458
468
  static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableTextColumnComponent, never>;
459
- static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableTextColumnComponent, "ax-text-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "allowSorting": { "alias": "allowSorting"; "required": false; }; "allowResizing": { "alias": "allowResizing"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "hasTitle": { "alias": "hasTitle"; "required": false; }; "customExpandIcon": { "alias": "customExpandIcon"; "required": false; }; "customCollapseIcon": { "alias": "customCollapseIcon"; "required": false; }; "dataField": { "alias": "dataField"; "required": false; }; "expandHandler": { "alias": "expandHandler"; "required": false; }; "wrapText": { "alias": "wrapText"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "format": { "alias": "format"; "required": false; }; "formatOptions": { "alias": "formatOptions"; "required": false; }; }, {}, never, never, true, never>;
469
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableTextColumnComponent, "ax-text-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "allowSorting": { "alias": "allowSorting"; "required": false; }; "allowResizing": { "alias": "allowResizing"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "hasTitle": { "alias": "hasTitle"; "required": false; }; "customExpandIcon": { "alias": "customExpandIcon"; "required": false; }; "customCollapseIcon": { "alias": "customCollapseIcon"; "required": false; }; "dataField": { "alias": "dataField"; "required": false; }; "expandHandler": { "alias": "expandHandler"; "required": false; }; "wrapText": { "alias": "wrapText"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "format": { "alias": "format"; "required": false; }; "formatOptions": { "alias": "formatOptions"; "required": false; }; }, {}, never, ["*"], true, never>;
460
470
  }
461
471
 
462
472
  type AXRowCommandItem = AXButtonItemListItem & {
@@ -542,7 +552,7 @@ declare class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumn
542
552
  */
543
553
  protected handleOnItemClick(e: AXItemClickEvent<AXButtonItemComponent>, data: unknown): void;
544
554
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowDropdownCommandColumnComponent, never>;
545
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRowDropdownCommandColumnComponent, "ax-dropdown-command-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "emptyStateTemplate": { "alias": "emptyStateTemplate"; "required": false; }; "emptyStateText": { "alias": "emptyStateText"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "onItemClick": "onItemClick"; }, never, never, true, never>;
555
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRowDropdownCommandColumnComponent, "ax-dropdown-command-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "emptyStateTemplate": { "alias": "emptyStateTemplate"; "required": false; }; "emptyStateText": { "alias": "emptyStateText"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "onItemClick": "onItemClick"; }, never, ["*"], true, never>;
546
556
  }
547
557
  /**
548
558
  * A column for displaying command buttons in a data table.
@@ -604,7 +614,7 @@ declare class AXRowCommandColumnComponent extends AXBaseRowCommandColumnComponen
604
614
  protected getCommandId(rowData: unknown, item: AXRowCommandItem): string;
605
615
  protected handleOnItemClick(e: AXClickEvent, item: AXRowCommandItem, data: unknown): void;
606
616
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowCommandColumnComponent, never>;
607
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRowCommandColumnComponent, "ax-command-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "onItemClick": "onItemClick"; }, never, never, true, never>;
617
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRowCommandColumnComponent, "ax-command-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "onItemClick": "onItemClick"; }, never, ["*"], true, never>;
608
618
  }
609
619
 
610
620
  /**
@@ -652,7 +662,7 @@ declare class AXRowExpandColumnComponent extends AXDataTableColumnComponent {
652
662
  */
653
663
  get loadingEnabled(): boolean;
654
664
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowExpandColumnComponent, never>;
655
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRowExpandColumnComponent, "ax-expand-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; }, {}, never, never, true, never>;
665
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRowExpandColumnComponent, "ax-expand-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; }, {}, never, ["*"], true, never>;
656
666
  }
657
667
 
658
668
  /**
@@ -724,16 +734,24 @@ declare class AXRowIndexColumnComponent extends AXDataTableColumnComponent imple
724
734
  */
725
735
  get cssClass(): string | undefined;
726
736
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowIndexColumnComponent, never>;
727
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRowIndexColumnComponent, "ax-index-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "padZero": { "alias": "padZero"; "required": false; }; }, {}, never, never, true, never>;
737
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRowIndexColumnComponent, "ax-index-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "padZero": { "alias": "padZero"; "required": false; }; }, {}, never, ["*"], true, never>;
728
738
  }
729
739
 
730
740
  /**
731
741
  * Column component that provides checkboxes for row selection in a data table.
742
+ * The header shows a split control: the checkbox selects all visible rows; the chevron opens
743
+ * a menu with reverse selection and unselect actions for visible rows.
732
744
  *
733
745
  * @category Components
734
746
  */
735
747
  declare class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
736
748
  private grid;
749
+ /**
750
+ * When enabled, shows a header dropdown with reverse and unselect actions for visible rows.
751
+ *
752
+ * @defaultValue `false`
753
+ */
754
+ advanceSelect: i0.InputSignal<boolean>;
737
755
  /**
738
756
  * @ignore
739
757
  */
@@ -748,6 +766,7 @@ declare class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
748
766
  private _contentHeaderTemplate;
749
767
  /**
750
768
  * Gets the template used to render the column header.
769
+ * Renders the header checkbox; when {@link advanceSelect} is enabled, a chevron opens a menu with Reverse and Unselect actions scoped to visible rows.
751
770
  */
752
771
  get renderHeaderTemplate(): TemplateRef<unknown>;
753
772
  /**
@@ -766,14 +785,37 @@ declare class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
766
785
  * @ignore
767
786
  */
768
787
  private getDataSourceKey;
788
+ /**
789
+ * @ignore
790
+ */
791
+ private resolveSelectableRows;
769
792
  /**
770
793
  * @ignore
771
794
  */
772
795
  protected isSelected(item: unknown): boolean;
796
+ /**
797
+ * Header checkbox model: `true` when every visible row is selected, `false` when none are,
798
+ * and `null` for a partial (indeterminate) selection.
799
+ *
800
+ * @ignore
801
+ */
802
+ headerCheckboxValue(rows: unknown[] | null | undefined, selectedRows?: unknown[]): boolean;
803
+ /**
804
+ * @ignore
805
+ */
806
+ onHeaderSelectAll(e: AXValueChangedEvent, rows: unknown[] | null | undefined): void;
807
+ /**
808
+ * @ignore
809
+ */
810
+ onHeaderReverseSelect(rows: unknown[] | null | undefined): void;
773
811
  /**
774
812
  * @ignore
775
813
  */
776
- protected checkAllSelected(rows: any): boolean;
814
+ onHeaderUnselect(rows: unknown[] | null | undefined): void;
815
+ /**
816
+ * @ignore
817
+ */
818
+ protected checkAllSelected(rows: unknown[] | null | undefined, selectedRows?: unknown[]): boolean | null;
777
819
  /**
778
820
  * @ignore
779
821
  */
@@ -781,7 +823,15 @@ declare class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
781
823
  /**
782
824
  * @ignore
783
825
  */
784
- protected handleSelectAll(e: AXValueChangedEvent, rows: any): void;
826
+ protected handleSelectAll(e: AXValueChangedEvent, rows: unknown[] | null | undefined): void;
827
+ /**
828
+ * @ignore
829
+ */
830
+ protected handleReverseSelect(rows: unknown[] | null | undefined): void;
831
+ /**
832
+ * @ignore
833
+ */
834
+ protected handleUnselect(rows: unknown[] | null | undefined): void;
785
835
  /**
786
836
  * Indicates whether loading is enabled for the column.
787
837
  */
@@ -791,7 +841,30 @@ declare class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
791
841
  */
792
842
  get cssClass(): string | undefined;
793
843
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowSelectColumnComponent, never>;
794
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRowSelectColumnComponent, "ax-select-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; }, {}, never, never, true, never>;
844
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRowSelectColumnComponent, "ax-select-column", never, { "width": { "alias": "width"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "advanceSelect": { "alias": "advanceSelect"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
845
+ }
846
+
847
+ interface DataTableBandHeaderCell {
848
+ type: 'band';
849
+ caption: string;
850
+ colspan: number;
851
+ /** Top-level column used for drag-reorder on the first header row. */
852
+ column: AXDataTableColumnComponent;
853
+ }
854
+ interface DataTableLeafHeaderCell {
855
+ type: 'leaf';
856
+ column: AXDataTableColumnComponent;
857
+ rowspan: number;
858
+ }
859
+ interface DataTableGapHeaderCell {
860
+ type: 'gap';
861
+ }
862
+ type DataTableHeaderCell = DataTableBandHeaderCell | DataTableLeafHeaderCell | DataTableGapHeaderCell;
863
+ interface DataTableHeaderRowModel {
864
+ start: DataTableHeaderCell[];
865
+ normal: DataTableHeaderCell[];
866
+ end: DataTableHeaderCell[];
867
+ includeSpacer: boolean;
795
868
  }
796
869
 
797
870
  /**
@@ -845,24 +918,75 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
845
918
  /**
846
919
  * @ignore
847
920
  */
848
- protected columnsList: WritableSignal<any[]>;
921
+ protected columnsList: WritableSignal<AXDataTableColumnComponent[]>;
922
+ /**
923
+ * Top-level column tree (bands and leaves) in display order.
924
+ * @ignore
925
+ */
926
+ protected topLevelColumnsList: WritableSignal<AXDataTableColumnComponent[]>;
927
+ /**
928
+ * @ignore
929
+ */
930
+ protected headerDepth: Signal<number>;
849
931
  /**
850
932
  * @ignore
851
933
  */
852
- protected endFixedColumnsList: Signal<any[]>;
934
+ protected headerRows: Signal<DataTableHeaderRowModel[]>;
853
935
  /**
854
936
  * @ignore
855
937
  */
856
- protected startFixedColumnsList: Signal<any[]>;
938
+ protected topLevelEndFixedColumnsList: Signal<AXDataTableColumnComponent[]>;
857
939
  /**
858
940
  * @ignore
859
941
  */
860
- protected normalColumnsList: Signal<any[]>;
942
+ protected topLevelStartFixedColumnsList: Signal<AXDataTableColumnComponent[]>;
943
+ /**
944
+ * @ignore
945
+ */
946
+ protected topLevelNormalColumnsList: Signal<AXDataTableColumnComponent[]>;
947
+ /**
948
+ * @ignore
949
+ */
950
+ protected endFixedColumnsList: Signal<AXDataTableColumnComponent[]>;
951
+ /**
952
+ * @ignore
953
+ */
954
+ protected startFixedColumnsList: Signal<AXDataTableColumnComponent[]>;
955
+ /**
956
+ * @ignore
957
+ */
958
+ protected normalColumnsList: Signal<AXDataTableColumnComponent[]>;
861
959
  /**
862
960
  * True when a text column owns the tree expander. That column stays `width: auto`
863
961
  * so leftover table space is used for nested indent instead of the empty spacer.
864
962
  */
865
963
  protected hasTreeFillColumn: Signal<boolean>;
964
+ /**
965
+ * @ignore
966
+ */
967
+ protected isSelectColumn(column: AXDataTableColumnComponent): column is AXRowSelectColumnComponent;
968
+ /**
969
+ * @ignore
970
+ */
971
+ protected getEffectiveFixed(column: AXDataTableColumnComponent): 'start' | 'end' | undefined;
972
+ /**
973
+ * @ignore
974
+ */
975
+ protected isHeaderBandCell(cell: DataTableHeaderCell): cell is DataTableBandHeaderCell;
976
+ /**
977
+ * @ignore
978
+ */
979
+ protected isHeaderGapCell(cell: DataTableHeaderCell): boolean;
980
+ /**
981
+ * @ignore
982
+ */
983
+ protected asLeafHeaderCell(cell: DataTableHeaderCell): DataTableLeafHeaderCell;
984
+ /**
985
+ * @ignore
986
+ */
987
+ protected isTopLevelColumn(column: AXDataTableColumnComponent): boolean;
988
+ private refreshColumnStructure;
989
+ private watchBandChildren;
866
990
  /**
867
991
  * @ignore
868
992
  */
@@ -871,6 +995,7 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
871
995
  startWidth: number;
872
996
  column: AXDataTableColumnComponent | null;
873
997
  thElement: HTMLElement | null;
998
+ colElement: HTMLElement | null;
874
999
  /** True when the resize handle sits on the column's trailing edge in screen coordinates. */
875
1000
  resizeFromTrailingEdge: boolean;
876
1001
  };
@@ -1182,6 +1307,11 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
1182
1307
  * @ignore
1183
1308
  */
1184
1309
  private resetResizingProcess;
1310
+ /**
1311
+ * Index of a leaf column in `<colgroup>` (start → normal → spacer → end).
1312
+ */
1313
+ private getColumnColIndex;
1314
+ private resolveColElementForColumn;
1185
1315
  /**
1186
1316
  * @ignore
1187
1317
  */