@acorex/components 21.0.1-next.50 → 21.0.1-next.51
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/data-table/index.d.ts
CHANGED
|
@@ -42,6 +42,12 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
|
|
|
42
42
|
* @defaultValue `parentId`
|
|
43
43
|
*/
|
|
44
44
|
parentField: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Field name on each row that indicates whether the row has children (for showing expand icon).
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue `hasChild`
|
|
49
|
+
*/
|
|
50
|
+
hasChildrenField: string;
|
|
45
51
|
/**
|
|
46
52
|
* Template for expanded custom row content.
|
|
47
53
|
*/
|
|
@@ -166,7 +172,7 @@ declare class AXDataTableColumnResizableDirective {
|
|
|
166
172
|
* @category Components
|
|
167
173
|
*/
|
|
168
174
|
declare class AXDataTableTextColumnComponent extends AXDataTableColumnComponent {
|
|
169
|
-
|
|
175
|
+
protected grid: AXBaseDataTable;
|
|
170
176
|
protected loadingRow: i0.WritableSignal<any>;
|
|
171
177
|
protected initialWidth: string;
|
|
172
178
|
customExpandIcon: string;
|
|
@@ -415,7 +421,7 @@ declare class AXRowCommandColumnComponent extends AXBaseRowCommandColumnComponen
|
|
|
415
421
|
* @category Components
|
|
416
422
|
*/
|
|
417
423
|
declare class AXRowExpandColumnComponent extends AXDataTableColumnComponent {
|
|
418
|
-
|
|
424
|
+
protected grid: AXBaseDataTable;
|
|
419
425
|
protected loadingRow: i0.WritableSignal<any>;
|
|
420
426
|
/**
|
|
421
427
|
* @ignore
|
|
@@ -1214,7 +1220,7 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
1214
1220
|
maxWidth?: number;
|
|
1215
1221
|
}): void;
|
|
1216
1222
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableComponent, never>;
|
|
1217
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "parentField": { "alias": "parentField"; "required": false; }; "rowDetailsTemplate": { "alias": "rowDetailsTemplate"; "required": false; }; "title": { "alias": "title"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "noDataTemplate": { "alias": "noDataTemplate"; "required": false; }; "alternative": { "alias": "alternative"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "fixedHeader": { "alias": "fixedHeader"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "fixedFooter": { "alias": "fixedFooter"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; "allowReordering": { "alias": "allowReordering"; "required": false; }; "paging": { "alias": "paging"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "focusedRow": { "alias": "focusedRow"; "required": false; }; }, { "selectedRowsChange": "selectedRowsChange"; "focusedRowChange": "focusedRowChange"; "onRowClick": "onRowClick"; "onRowDbClick": "onRowDbClick"; "onColumnsOrderChanged": "onColumnsOrderChanged"; "onColumnSizeChanged": "onColumnSizeChanged"; "onPageChanged": "onPageChanged"; }, ["customDataPager", "columns"], ["ax-header", "ax-data-pager", "ax-footer"], true, never>;
|
|
1223
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "parentField": { "alias": "parentField"; "required": false; }; "hasChildrenField": { "alias": "hasChildrenField"; "required": false; }; "rowDetailsTemplate": { "alias": "rowDetailsTemplate"; "required": false; }; "title": { "alias": "title"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "noDataTemplate": { "alias": "noDataTemplate"; "required": false; }; "alternative": { "alias": "alternative"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "fixedHeader": { "alias": "fixedHeader"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "fixedFooter": { "alias": "fixedFooter"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; "allowReordering": { "alias": "allowReordering"; "required": false; }; "paging": { "alias": "paging"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "focusedRow": { "alias": "focusedRow"; "required": false; }; }, { "selectedRowsChange": "selectedRowsChange"; "focusedRowChange": "focusedRowChange"; "onRowClick": "onRowClick"; "onRowDbClick": "onRowDbClick"; "onColumnsOrderChanged": "onColumnsOrderChanged"; "onColumnSizeChanged": "onColumnSizeChanged"; "onPageChanged": "onPageChanged"; }, ["customDataPager", "columns"], ["ax-header", "ax-data-pager", "ax-footer"], true, never>;
|
|
1218
1224
|
}
|
|
1219
1225
|
|
|
1220
1226
|
declare class AXDataTableModule {
|
|
@@ -37,6 +37,12 @@ class AXBaseDataTable extends MXBaseComponent {
|
|
|
37
37
|
* @defaultValue `parentId`
|
|
38
38
|
*/
|
|
39
39
|
this.parentField = undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Field name on each row that indicates whether the row has children (for showing expand icon).
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue `hasChild`
|
|
44
|
+
*/
|
|
45
|
+
this.hasChildrenField = 'hasChild';
|
|
40
46
|
this.selectedRowsChange = new EventEmitter();
|
|
41
47
|
this._selectedRows = signal([], ...(ngDevMode ? [{ debugName: "_selectedRows" }] : []));
|
|
42
48
|
}
|
|
@@ -140,6 +146,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
140
146
|
type: Input
|
|
141
147
|
}], parentField: [{
|
|
142
148
|
type: Input
|
|
149
|
+
}], hasChildrenField: [{
|
|
150
|
+
type: Input
|
|
143
151
|
}], rowDetailsTemplate: [{
|
|
144
152
|
type: Input
|
|
145
153
|
}], selectedRowsChange: [{
|
|
@@ -361,7 +369,7 @@ class AXDataTableTextColumnComponent extends AXDataTableColumnComponent {
|
|
|
361
369
|
<ng-template #header>{{ caption }}</ng-template>
|
|
362
370
|
<ng-template #cell let-row>
|
|
363
371
|
<div class="ax-flex ax-items-center ax-gap-2">
|
|
364
|
-
@if (expandHandler && (row.data?.
|
|
372
|
+
@if (expandHandler && (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0)) {
|
|
365
373
|
<div
|
|
366
374
|
(click)="handleExpandRow(row)"
|
|
367
375
|
class="ax-expand-handler"
|
|
@@ -399,7 +407,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
399
407
|
<ng-template #header>{{ caption }}</ng-template>
|
|
400
408
|
<ng-template #cell let-row>
|
|
401
409
|
<div class="ax-flex ax-items-center ax-gap-2">
|
|
402
|
-
@if (expandHandler && (row.data?.
|
|
410
|
+
@if (expandHandler && (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0)) {
|
|
403
411
|
<div
|
|
404
412
|
(click)="handleExpandRow(row)"
|
|
405
413
|
class="ax-expand-handler"
|
|
@@ -1016,7 +1024,7 @@ class AXRowExpandColumnComponent extends AXDataTableColumnComponent {
|
|
|
1016
1024
|
], viewQueries: [{ propertyName: "_cellTemplate", first: true, predicate: ["cell"], descendants: true }, { propertyName: "_contentHeaderTemplate", first: true, predicate: ["header"], descendants: true }, { propertyName: "_contentFooterTemplate", first: true, predicate: ["footer"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1017
1025
|
<ng-template #header></ng-template>
|
|
1018
1026
|
<ng-template #cell let-row>
|
|
1019
|
-
@if (row.data?.
|
|
1027
|
+
@if (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0) {
|
|
1020
1028
|
<div
|
|
1021
1029
|
(click)="handleExpandRow(row)"
|
|
1022
1030
|
class="ax-expand-handler"
|
|
@@ -1044,7 +1052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
1044
1052
|
template: `
|
|
1045
1053
|
<ng-template #header></ng-template>
|
|
1046
1054
|
<ng-template #cell let-row>
|
|
1047
|
-
@if (row.data?.
|
|
1055
|
+
@if (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0) {
|
|
1048
1056
|
<div
|
|
1049
1057
|
(click)="handleExpandRow(row)"
|
|
1050
1058
|
class="ax-expand-handler"
|
|
@@ -1756,7 +1764,7 @@ class AXDataTableComponent extends AXBaseDataTable {
|
|
|
1756
1764
|
...item,
|
|
1757
1765
|
__meta__: { expanded: isExpanded, level: expandedItem?.__meta__?.level ?? 0 },
|
|
1758
1766
|
children: nextChildren,
|
|
1759
|
-
|
|
1767
|
+
[this.hasChildrenField]: nextChildren != null && nextChildren.length > 0,
|
|
1760
1768
|
};
|
|
1761
1769
|
}
|
|
1762
1770
|
else if (item.children) {
|
|
@@ -1782,7 +1790,7 @@ class AXDataTableComponent extends AXBaseDataTable {
|
|
|
1782
1790
|
return {
|
|
1783
1791
|
...item,
|
|
1784
1792
|
children: cloneDeep(newChildren),
|
|
1785
|
-
|
|
1793
|
+
[this.hasChildrenField]: newChildren.length > 0,
|
|
1786
1794
|
};
|
|
1787
1795
|
}
|
|
1788
1796
|
else if (item.children) {
|
|
@@ -2188,7 +2196,7 @@ class AXDataTableComponent extends AXBaseDataTable {
|
|
|
2188
2196
|
}
|
|
2189
2197
|
}
|
|
2190
2198
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDataTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2191
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXDataTableComponent, isStandalone: true, selector: "ax-data-table", inputs: { dataSource: "dataSource", selectedRows: "selectedRows", parentField: "parentField", rowDetailsTemplate: "rowDetailsTemplate", title: "title", rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", noDataTemplate: "noDataTemplate", alternative: "alternative", showHeader: "showHeader", fixedHeader: "fixedHeader", showFooter: "showFooter", fixedFooter: "fixedFooter", itemHeight: "itemHeight", allowReordering: "allowReordering", paging: "paging", fetchDataMode: "fetchDataMode", loading: "loading", focusedRow: "focusedRow" }, outputs: { selectedRowsChange: "selectedRowsChange", focusedRowChange: "focusedRowChange", onRowClick: "onRowClick", onRowDbClick: "onRowDbClick", onColumnsOrderChanged: "onColumnsOrderChanged", onColumnSizeChanged: "onColumnSizeChanged", onPageChanged: "onPageChanged" }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [
|
|
2199
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXDataTableComponent, isStandalone: true, selector: "ax-data-table", inputs: { dataSource: "dataSource", selectedRows: "selectedRows", parentField: "parentField", hasChildrenField: "hasChildrenField", rowDetailsTemplate: "rowDetailsTemplate", title: "title", rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", noDataTemplate: "noDataTemplate", alternative: "alternative", showHeader: "showHeader", fixedHeader: "fixedHeader", showFooter: "showFooter", fixedFooter: "fixedFooter", itemHeight: "itemHeight", allowReordering: "allowReordering", paging: "paging", fetchDataMode: "fetchDataMode", loading: "loading", focusedRow: "focusedRow" }, outputs: { selectedRowsChange: "selectedRowsChange", focusedRowChange: "focusedRowChange", onRowClick: "onRowClick", onRowDbClick: "onRowDbClick", onColumnsOrderChanged: "onColumnsOrderChanged", onColumnSizeChanged: "onColumnSizeChanged", onPageChanged: "onPageChanged" }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [
|
|
2192
2200
|
{ provide: AXBaseDataTable, useExisting: AXDataTableComponent },
|
|
2193
2201
|
AXUnsubscriber,
|
|
2194
2202
|
{ provide: AXComponent, useExisting: AXDataTableComponent },
|
|
@@ -2196,7 +2204,7 @@ class AXDataTableComponent extends AXBaseDataTable {
|
|
|
2196
2204
|
}
|
|
2197
2205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDataTableComponent, decorators: [{
|
|
2198
2206
|
type: Component,
|
|
2199
|
-
args: [{ selector: 'ax-data-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { ngSkipHydration: 'true' }, inputs: ['dataSource', 'selectedRows', 'parentField', 'rowDetailsTemplate', 'title'], outputs: ['selectedRowsChange'], providers: [
|
|
2207
|
+
args: [{ selector: 'ax-data-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { ngSkipHydration: 'true' }, inputs: ['dataSource', 'selectedRows', 'parentField', 'hasChildrenField', 'rowDetailsTemplate', 'title'], outputs: ['selectedRowsChange'], providers: [
|
|
2200
2208
|
{ provide: AXBaseDataTable, useExisting: AXDataTableComponent },
|
|
2201
2209
|
AXUnsubscriber,
|
|
2202
2210
|
{ provide: AXComponent, useExisting: AXDataTableComponent },
|