@acorex/components 21.0.0-next.28 → 21.0.0-next.29

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/button/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
2
  import { EventEmitter, QueryList, AfterViewInit } from '@angular/core';
3
3
  import { MXInteractiveComponent, MXColorComponent, AXClickEvent, AXStyleColorType, AXItemClickEvent, AXStyleLookType, AXHotKeyAction, MXButtonBaseComponent } from '@acorex/cdk/common';
4
4
  import * as polytype from 'polytype';
@@ -11,7 +11,9 @@ interface AXButtonItemListItem {
11
11
  divided?: boolean;
12
12
  disabled?: boolean;
13
13
  selected?: boolean;
14
+ iconOnly?: boolean;
14
15
  color?: AXStyleColorType;
16
+ loading?: boolean;
15
17
  }
16
18
  declare const AXButtonItemComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXInteractiveComponent, typeof MXColorComponent]>;
17
19
  /**
@@ -93,8 +95,8 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
93
95
  * @ignore
94
96
  */
95
97
  tabindex: string;
96
- static ɵfac: i0.ɵɵFactoryDeclaration<AXButtonItemComponent, never>;
97
- static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonItemComponent, "ax-button-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; }, never, ["ax-prefix", "ax-loading", "ax-icon", "ax-suffix", "ax-dropdown-panel"], true, never>;
98
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonItemComponent, never>;
99
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonItemComponent, "ax-button-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; }, never, ["ax-prefix", "ax-loading", "ax-icon", "ax-suffix", "ax-dropdown-panel"], true, never>;
98
100
  }
99
101
 
100
102
  /**
@@ -110,7 +112,20 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
110
112
  *
111
113
  * @defaultValue []
112
114
  */
113
- items: i0.InputSignal<AXButtonItemListItem[]>;
115
+ items: _angular_core.InputSignal<AXButtonItemListItem[]>;
116
+ /**
117
+ * Determines if the parent closable component should be closed automatically when
118
+ * an item is clicked.
119
+ *
120
+ * @defaultValue true
121
+ */
122
+ closeParentOnClick: _angular_core.InputSignal<boolean>;
123
+ /**
124
+ * Locks interaction for all items when any item is loading.
125
+ *
126
+ * @defaultValue false
127
+ */
128
+ lockOnLoading: _angular_core.InputSignal<boolean>;
114
129
  /**
115
130
  * Emits an event when an item is clicked.
116
131
  * The event contains details about the clicked item.
@@ -125,6 +140,8 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
125
140
  * @ignore
126
141
  */
127
142
  constructor();
143
+ protected isDisabled(item: AXButtonItemListItem): boolean;
144
+ protected hasAnyLoadingItem(): boolean;
128
145
  /**
129
146
  * Initializes the content of the button item list.
130
147
  * Binds events and properties to content button items and marks for change detection.
@@ -162,6 +179,10 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
162
179
  * @ignore
163
180
  */
164
181
  _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void;
182
+ /**
183
+ * Closes the parent closable component if available.
184
+ */
185
+ closeParent(): void;
165
186
  /**
166
187
  * Generates the CSS classes for the button item list host element.
167
188
  * Includes classes for action list and vertical layout.
@@ -170,8 +191,8 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
170
191
  * @ignore
171
192
  */
172
193
  private get __hostClass();
173
- static ɵfac: i0.ɵɵFactoryDeclaration<AXButtonItemListComponent, never>;
174
- static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonItemListComponent, "ax-button-item-list", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "onItemClick": "onItemClick"; }, ["_contentButtons"], ["*"], true, never>;
194
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonItemListComponent, never>;
195
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonItemListComponent, "ax-button-item-list", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "closeParentOnClick": { "alias": "closeParentOnClick"; "required": false; "isSignal": true; }; "lockOnLoading": { "alias": "lockOnLoading"; "required": false; "isSignal": true; }; }, { "onItemClick": "onItemClick"; }, ["_contentButtons"], ["*"], true, never>;
175
196
  }
176
197
 
177
198
  type AXButtonType = 'submit' | 'button' | 'cancel' | 'reset';
@@ -204,10 +225,10 @@ interface AXButtonItem {
204
225
  * @category Components
205
226
  */
206
227
  declare class AXButtonComponent extends MXButtonBaseComponent implements AfterViewInit {
207
- iconOnly: i0.InputSignal<boolean>;
208
- protected showIcon: i0.Signal<boolean>;
209
- protected loadingIcon: i0.Signal<AXLoadingComponent>;
210
- protected hasLoadingIcon: i0.Signal<boolean>;
228
+ iconOnly: _angular_core.InputSignal<boolean>;
229
+ protected showIcon: _angular_core.Signal<boolean>;
230
+ protected loadingIcon: _angular_core.Signal<AXLoadingComponent>;
231
+ protected hasLoadingIcon: _angular_core.Signal<boolean>;
211
232
  /**
212
233
  * Fires each time the user clicks the button.
213
234
  * @event
@@ -218,13 +239,13 @@ declare class AXButtonComponent extends MXButtonBaseComponent implements AfterVi
218
239
  *
219
240
  * @defaultValue 'button'
220
241
  */
221
- type: i0.InputSignal<AXButtonType>;
242
+ type: _angular_core.InputSignal<AXButtonType>;
222
243
  /**
223
244
  * Defines the text displayed while the action sheet is loading.
224
245
  *
225
246
  * @defaultValue null
226
247
  */
227
- loadingText: i0.ModelSignal<string>;
248
+ loadingText: _angular_core.ModelSignal<string>;
228
249
  /**
229
250
  * @ignore
230
251
  */
@@ -255,14 +276,14 @@ declare class AXButtonComponent extends MXButtonBaseComponent implements AfterVi
255
276
  * when the button loses focus.
256
277
  */
257
278
  blur(): void;
258
- static ɵfac: i0.ɵɵFactoryDeclaration<AXButtonComponent, never>;
259
- static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonComponent, "ax-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "text": { "alias": "text"; "required": false; }; "toggleable": { "alias": "toggleable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "onClick": "onClick"; "selectedChange": "selectedChange"; "toggleableChange": "toggleableChange"; "lookChange": "lookChange"; "colorChange": "colorChange"; "disabledChange": "disabledChange"; "loadingText": "loadingTextChange"; }, ["loadingIcon"], ["ax-loading, ax-loading-spinner", "ax-prefix, ax-icon", "ax-content", "ax-suffix", "ax-dropdown-panel", ".tab-content", "*"], true, never>;
279
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonComponent, never>;
280
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonComponent, "ax-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "text": { "alias": "text"; "required": false; }; "toggleable": { "alias": "toggleable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "onClick": "onClick"; "selectedChange": "selectedChange"; "toggleableChange": "toggleableChange"; "lookChange": "lookChange"; "colorChange": "colorChange"; "disabledChange": "disabledChange"; "loadingText": "loadingTextChange"; }, ["loadingIcon"], ["ax-loading, ax-loading-spinner", "ax-prefix, ax-icon", "ax-content", "ax-suffix", "ax-dropdown-panel", ".tab-content", "*"], true, never>;
260
281
  }
261
282
 
262
283
  declare class AXButtonModule {
263
- static ɵfac: i0.ɵɵFactoryDeclaration<AXButtonModule, never>;
264
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXButtonModule, never, [typeof AXButtonComponent, typeof AXButtonItemComponent, typeof AXButtonItemListComponent], [typeof AXButtonComponent, typeof AXButtonItemComponent, typeof AXButtonItemListComponent]>;
265
- static ɵinj: i0.ɵɵInjectorDeclaration<AXButtonModule>;
284
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonModule, never>;
285
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXButtonModule, never, [typeof AXButtonComponent, typeof AXButtonItemComponent, typeof AXButtonItemListComponent], [typeof AXButtonComponent, typeof AXButtonItemComponent, typeof AXButtonItemListComponent]>;
286
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXButtonModule>;
266
287
  }
267
288
 
268
289
  export { AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent, AXButtonModule };
@@ -1,5 +1,5 @@
1
1
  import * as i2 from '@acorex/cdk/common';
2
- import { AXEvent, MXBaseComponent, AXDataSource, AXSortOrder, AXButtonClickEvent, AXItemClickEvent, AXValueChangedEvent, AXListDataSource } from '@acorex/cdk/common';
2
+ import { AXEvent, MXBaseComponent, AXDataSource, AXSortOrder, AXStyleLookType, AXButtonClickEvent, AXItemClickEvent, AXClickEvent, AXValueChangedEvent, AXListDataSource } from '@acorex/cdk/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { EventEmitter, TemplateRef, ChangeDetectorRef, OnInit, DoCheck, QueryList, WritableSignal, ElementRef, AfterViewInit, Signal } from '@angular/core';
5
5
  import * as i11 from '@acorex/core/format';
@@ -245,14 +245,24 @@ declare class AXDataTableTextColumnComponent extends AXDataTableColumnComponent
245
245
  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; }; "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; }; "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>;
246
246
  }
247
247
 
248
- type AXRowCommandItem = AXButtonItemListItem;
249
- type AXRowCommandItemClickEvent = AXButtonClickEvent;
248
+ type AXRowCommandItem = AXButtonItemListItem & {
249
+ commandId?: string;
250
+ look?: AXStyleLookType;
251
+ };
252
+ interface AXRowCommandItemClickEvent extends AXButtonClickEvent {
253
+ setLoading?: (loading: boolean) => void;
254
+ }
250
255
  declare abstract class AXBaseRowCommandColumnComponent extends AXDataTableColumnComponent {
251
256
  protected grid: AXBaseDataTable;
252
257
  protected cdr: ChangeDetectorRef;
258
+ protected commandLoading: i0.WritableSignal<string>;
259
+ private rowIdentityMap;
260
+ private rowIdentitySeq;
253
261
  allowSorting: boolean;
254
262
  get loadingEnabled(): boolean;
255
263
  get cssClass(): string;
264
+ protected resolveCommandId(rowData: unknown, commandName: string): string;
265
+ protected setCommandLoadingState(commandId: string, loading: boolean): void;
256
266
  onItemClick: EventEmitter<AXRowCommandItemClickEvent>;
257
267
  }
258
268
  /**
@@ -280,6 +290,10 @@ declare class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumn
280
290
  */
281
291
  get renderHeaderTemplate(): TemplateRef<unknown>;
282
292
  footerTemplate: TemplateRef<unknown>;
293
+ emptyStateTemplate?: TemplateRef<unknown>;
294
+ emptyStateText: string;
295
+ protected itemsLoading: i0.WritableSignal<boolean>;
296
+ protected itemsFetched: i0.WritableSignal<boolean>;
283
297
  /**
284
298
  * @ignore
285
299
  */
@@ -298,6 +312,7 @@ declare class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumn
298
312
  */
299
313
  protected _items: AXRowCommandItem[];
300
314
  items: AXRowCommandItem[] | ((rowData: unknown) => AXRowCommandItem[] | Promise<AXRowCommandItem[]>);
315
+ private dropdownLoadingEffect;
301
316
  /**
302
317
  * @ignore
303
318
  */
@@ -306,12 +321,14 @@ declare class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumn
306
321
  * @ignore
307
322
  */
308
323
  protected handleOnClosed(): void;
324
+ private decorateItems;
325
+ private applyLoadingState;
309
326
  /**
310
327
  * @ignore
311
328
  */
312
329
  protected handleOnItemClick(e: AXItemClickEvent<AXButtonItemComponent>, data: unknown): void;
313
330
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowDropdownCommandColumnComponent, never>;
314
- 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; }; "items": { "alias": "items"; "required": false; }; }, { "onItemClick": "onItemClick"; }, never, never, true, never>;
331
+ 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>;
315
332
  }
316
333
  /**
317
334
  * A column for displaying command buttons in a data table.
@@ -363,10 +380,15 @@ declare class AXRowCommandColumnComponent extends AXBaseRowCommandColumnComponen
363
380
  * @ignore
364
381
  */
365
382
  protected getItems(rowData: unknown): AXRowCommandItem[];
383
+ protected getItemsWithIds(rowData: unknown): Array<{
384
+ item: AXRowCommandItem;
385
+ commandId: string;
386
+ }>;
366
387
  /**
367
388
  * @ignore
368
389
  */
369
- protected handleOnItemClick(e: MouseEvent, item: AXRowCommandItem, data: unknown): void;
390
+ protected getCommandId(rowData: unknown, item: AXRowCommandItem): string;
391
+ protected handleOnItemClick(e: AXClickEvent, item: AXRowCommandItem, data: unknown): void;
370
392
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRowCommandColumnComponent, never>;
371
393
  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>;
372
394
  }
@@ -910,6 +932,14 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
910
932
  * @defaultValue `true`
911
933
  */
912
934
  alternative: boolean;
935
+ /**
936
+ * Auto-fits all columns width on initial data load.
937
+ * Only applies to columns with allowResizing=true.
938
+ * Fixed columns are skipped by default.
939
+ *
940
+ * @defaultValue `false`
941
+ */
942
+ autoFitColumnsOnLoad: boolean;
913
943
  /**
914
944
  * Indicates if the table header should be displayed.
915
945
  *
@@ -1096,6 +1126,14 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
1096
1126
  * @ignore
1097
1127
  */
1098
1128
  protected calculateRowIndex(index: number): number;
1129
+ /**
1130
+ * Handles double-click on resize handle to auto-fit column width.
1131
+ *
1132
+ * @param event - The mouse event from the double-click
1133
+ * @param columnIndex - The index of the column to auto-fit
1134
+ * @ignore
1135
+ */
1136
+ protected onResizeHandlerDoubleClick(event: MouseEvent, columnIndex: number): void;
1099
1137
  /**
1100
1138
  * @ignore
1101
1139
  */
@@ -1116,8 +1154,35 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
1116
1154
  * @ignore
1117
1155
  */
1118
1156
  private calculateStickyColumnsPositions;
1157
+ /**
1158
+ * Auto-fits all columns width based on their content.
1159
+ *
1160
+ * @param options - Configuration options
1161
+ * @param options.skipFixed - If true, skips fixed columns (default: true)
1162
+ * @param options.skipLoading - If true, skips if data is loading (default: true)
1163
+ * @param options.maxWidth - Maximum width for any column in pixels (default: 500)
1164
+ * @returns void
1165
+ */
1166
+ autoFitAllColumns(options?: {
1167
+ skipFixed?: boolean;
1168
+ skipLoading?: boolean;
1169
+ maxWidth?: number;
1170
+ }): void;
1171
+ /**
1172
+ * Auto-fits a column width based on its content.
1173
+ * Similar to Excel's "AutoFit Column Width" feature.
1174
+ * Uses an invisible helper table to measure actual content width without affecting the main table.
1175
+ *
1176
+ * @param columnIndex - The index of the column to auto-fit (0-based, based on columns QueryList)
1177
+ * @param options - Configuration options
1178
+ * @param options.maxWidth - Maximum width for the column in pixels (default: none)
1179
+ * @returns void
1180
+ */
1181
+ autoFitColumn(columnIndex: number, options?: {
1182
+ maxWidth?: number;
1183
+ }): void;
1119
1184
  static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableComponent, never>;
1120
- static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "parentField": { "alias": "parentField"; "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>;
1185
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "parentField": { "alias": "parentField"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "noDataTemplate": { "alias": "noDataTemplate"; "required": false; }; "alternative": { "alias": "alternative"; "required": false; }; "autoFitColumnsOnLoad": { "alias": "autoFitColumnsOnLoad"; "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>;
1121
1186
  }
1122
1187
 
1123
1188
  declare class AXDataTableModule {
@@ -1,5 +1,6 @@
1
1
  import { MXInteractiveComponent, MXColorComponent, AXComponent, AXClosableComponent, MXButtonBaseComponent, AXRippleDirective, AXFocusableComponent } from '@acorex/cdk/common';
2
2
  import { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';
3
+ import { AXLoadingComponent } from '@acorex/components/loading';
3
4
  import * as i0 from '@angular/core';
4
5
  import { EventEmitter, HostBinding, HostListener, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, input, afterNextRender, ContentChildren, computed, contentChild, model, NgModule } from '@angular/core';
5
6
  import * as i2 from '@acorex/core/translation';
@@ -7,7 +8,6 @@ import { AXTranslationModule } from '@acorex/core/translation';
7
8
  import * as i1 from '@angular/common';
8
9
  import { CommonModule } from '@angular/common';
9
10
  import { classes } from 'polytype';
10
- import { AXLoadingComponent } from '@acorex/components/loading';
11
11
 
12
12
  /**
13
13
  * Represents a button item with optional content like icons, text, and dropdowns.
@@ -187,6 +187,19 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
187
187
  * @defaultValue []
188
188
  */
189
189
  this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
190
+ /**
191
+ * Determines if the parent closable component should be closed automatically when
192
+ * an item is clicked.
193
+ *
194
+ * @defaultValue true
195
+ */
196
+ this.closeParentOnClick = input(true, ...(ngDevMode ? [{ debugName: "closeParentOnClick" }] : []));
197
+ /**
198
+ * Locks interaction for all items when any item is loading.
199
+ *
200
+ * @defaultValue false
201
+ */
202
+ this.lockOnLoading = input(false, ...(ngDevMode ? [{ debugName: "lockOnLoading" }] : []));
190
203
  /**
191
204
  * Emits an event when an item is clicked.
192
205
  * The event contains details about the clicked item.
@@ -201,6 +214,21 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
201
214
  });
202
215
  });
203
216
  }
217
+ isDisabled(item) {
218
+ if (item.disabled) {
219
+ return true;
220
+ }
221
+ if (item.loading) {
222
+ return true;
223
+ }
224
+ if (this.lockOnLoading() && this.hasAnyLoadingItem()) {
225
+ return true;
226
+ }
227
+ return false;
228
+ }
229
+ hasAnyLoadingItem() {
230
+ return this.items().some((item) => !!item.loading);
231
+ }
204
232
  /**
205
233
  * Initializes the content of the button item list.
206
234
  * Binds events and properties to content button items and marks for change detection.
@@ -245,7 +273,9 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
245
273
  * @ignore
246
274
  */
247
275
  _handleOnItemClick(e) {
248
- this.parent?.close();
276
+ if (this.closeParentOnClick()) {
277
+ this.parent?.close();
278
+ }
249
279
  this._emitOnItemClickEvent(e, e.component);
250
280
  }
251
281
  /**
@@ -265,6 +295,12 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
265
295
  data: item.data,
266
296
  });
267
297
  }
298
+ /**
299
+ * Closes the parent closable component if available.
300
+ */
301
+ closeParent() {
302
+ this.parent?.close();
303
+ }
268
304
  /**
269
305
  * Generates the CSS classes for the button item list host element.
270
306
  * Includes classes for action list and vertical layout.
@@ -276,17 +312,19 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
276
312
  return `ax-action-list ax-action-list-vertical`;
277
313
  }
278
314
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXButtonItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
279
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: AXButtonItemListComponent, isStandalone: true, selector: "ax-button-item-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXComponent, useExisting: AXButtonItemListComponent }], queries: [{ propertyName: "_contentButtons", predicate: AXButtonItemComponent }], usesInheritance: true, ngImport: i0, template: `
315
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: AXButtonItemListComponent, isStandalone: true, selector: "ax-button-item-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, closeParentOnClick: { classPropertyName: "closeParentOnClick", publicName: "closeParentOnClick", isSignal: true, isRequired: false, transformFunction: null }, lockOnLoading: { classPropertyName: "lockOnLoading", publicName: "lockOnLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXComponent, useExisting: AXButtonItemListComponent }], queries: [{ propertyName: "_contentButtons", predicate: AXButtonItemComponent }], usesInheritance: true, ngImport: i0, template: `
280
316
  @for (item of items(); track item.name) {
281
317
  <ax-button-item
282
318
  [text]="item.text"
283
319
  [name]="item.name"
284
- [disabled]="item.disabled"
320
+ [disabled]="isDisabled(item)"
285
321
  [color]="item.color"
286
322
  [selected]="item.selected"
287
323
  (onClick)="_handleOnItemClick($event)"
288
324
  >
289
- @if (item.icon) {
325
+ @if (item.loading) {
326
+ <ax-loading class="ax-button-item-loading"></ax-loading>
327
+ } @else if (item.icon) {
290
328
  <ax-prefix>
291
329
  <ax-icon [icon]="item.icon"></ax-icon>
292
330
  </ax-prefix>
@@ -297,7 +335,7 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
297
335
  }
298
336
  }
299
337
  <ng-content></ng-content>
300
- `, isInline: true, styles: ["ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}\n"], dependencies: [{ kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
338
+ `, isInline: true, styles: ["ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}ax-button-item-list .ax-button-item-loading{display:inline-flex;align-items:center;justify-content:center;inline-size:1.5rem;block-size:1.5rem}\n"], dependencies: [{ kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
301
339
  }
302
340
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXButtonItemListComponent, decorators: [{
303
341
  type: Component,
@@ -306,12 +344,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
306
344
  <ax-button-item
307
345
  [text]="item.text"
308
346
  [name]="item.name"
309
- [disabled]="item.disabled"
347
+ [disabled]="isDisabled(item)"
310
348
  [color]="item.color"
311
349
  [selected]="item.selected"
312
350
  (onClick)="_handleOnItemClick($event)"
313
351
  >
314
- @if (item.icon) {
352
+ @if (item.loading) {
353
+ <ax-loading class="ax-button-item-loading"></ax-loading>
354
+ } @else if (item.icon) {
315
355
  <ax-prefix>
316
356
  <ax-icon [icon]="item.icon"></ax-icon>
317
357
  </ax-prefix>
@@ -322,11 +362,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
322
362
  }
323
363
  }
324
364
  <ng-content></ng-content>
325
- `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXButtonItemComponent, AXDecoratorGenericComponent, AXDecoratorIconComponent], providers: [{ provide: AXComponent, useExisting: AXButtonItemListComponent }], styles: ["ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}\n"] }]
365
+ `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXButtonItemComponent, AXDecoratorGenericComponent, AXDecoratorIconComponent, AXLoadingComponent], providers: [{ provide: AXComponent, useExisting: AXButtonItemListComponent }], styles: ["ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}ax-button-item-list .ax-button-item-loading{display:inline-flex;align-items:center;justify-content:center;inline-size:1.5rem;block-size:1.5rem}\n"] }]
326
366
  }], ctorParameters: () => [], propDecorators: { _contentButtons: [{
327
367
  type: ContentChildren,
328
368
  args: [AXButtonItemComponent]
329
- }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], onItemClick: [{
369
+ }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], closeParentOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeParentOnClick", required: false }] }], lockOnLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockOnLoading", required: false }] }], onItemClick: [{
330
370
  type: Output
331
371
  }], __hostClass: [{
332
372
  type: HostBinding,