@acorex/components 22.0.0-next.9 → 22.1.0-next.0

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.
Files changed (51) hide show
  1. package/combo-box/README.md +26 -0
  2. package/fesm2022/acorex-components-calendar.mjs +10 -12
  3. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  4. package/fesm2022/acorex-components-combo-box.mjs +237 -0
  5. package/fesm2022/acorex-components-combo-box.mjs.map +1 -0
  6. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +50 -0
  7. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +1 -0
  8. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs} +2 -2
  9. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map} +1 -1
  10. package/fesm2022/acorex-components-conversation.mjs +2034 -7467
  11. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  12. package/fesm2022/acorex-components-data-table.mjs +135 -45
  13. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  14. package/fesm2022/acorex-components-datetime-box.mjs +14 -16
  15. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  16. package/fesm2022/acorex-components-datetime-input.mjs +61 -32
  17. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  18. package/fesm2022/acorex-components-dialog.mjs +3 -2
  19. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  20. package/fesm2022/acorex-components-file-viewer.mjs +27 -27
  21. package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
  22. package/fesm2022/acorex-components-grid-layout-builder.mjs +238 -36
  23. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  24. package/fesm2022/acorex-components-list.mjs +2 -2
  25. package/fesm2022/acorex-components-list.mjs.map +1 -1
  26. package/fesm2022/acorex-components-lookup.mjs +1292 -0
  27. package/fesm2022/acorex-components-lookup.mjs.map +1 -0
  28. package/fesm2022/acorex-components-menu.mjs +211 -74
  29. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  30. package/fesm2022/acorex-components-number-box.mjs +30 -29
  31. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  32. package/fesm2022/acorex-components-scheduler.mjs +7 -17
  33. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  34. package/fesm2022/acorex-components-select-box.mjs +2 -2
  35. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  36. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  37. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  38. package/lookup/README.md +47 -0
  39. package/package.json +11 -3
  40. package/types/acorex-components-combo-box.d.ts +114 -0
  41. package/types/acorex-components-conversation.d.ts +317 -94
  42. package/types/acorex-components-data-table.d.ts +35 -3
  43. package/types/acorex-components-datetime-box.d.ts +2 -0
  44. package/types/acorex-components-datetime-input.d.ts +24 -5
  45. package/types/acorex-components-grid-layout-builder.d.ts +34 -2
  46. package/types/acorex-components-lookup.d.ts +454 -0
  47. package/types/acorex-components-menu.d.ts +26 -4
  48. package/types/acorex-components-number-box.d.ts +3 -1
  49. package/types/acorex-components-scheduler.d.ts +2 -4
  50. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs +0 -106
  51. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs.map +0 -1
@@ -155,6 +155,7 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
155
155
  set highlightText(value: string | undefined);
156
156
  selectedRowsChange: EventEmitter<unknown[]>;
157
157
  protected readonly highlightedRows: WritableSignal<Map<string | number, AXDataTableRowHighlight>>;
158
+ protected readonly highlightedColumns: WritableSignal<Map<string, AXDataTableRowColorType>>;
158
159
  private readonly rowCssClassCache;
159
160
  private readonly cellCssClassCache;
160
161
  private readonly highlightService;
@@ -180,9 +181,40 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
180
181
  */
181
182
  highlightRows(rows: unknown[], options?: AXDataTableRowHighlightOptions): void;
182
183
  /**
183
- * Clears all temporary row highlights.
184
+ * Applies a color highlight to rows by their key (id) values.
185
+ * Unlike `highlightRow`, no badge, pulse, or pinning is applied.
186
+ *
187
+ * @param keys - Key (id) values of the rows to highlight.
188
+ * @param color - Semantic highlight color. @defaultValue `'primary'`
189
+ */
190
+ highlightRowsByKey(keys: (string | number)[], color?: AXDataTableRowColorType): void;
191
+ /**
192
+ * Clears temporary row highlights.
193
+ *
194
+ * @param keys - When provided, only highlights of rows with these key (id) values are cleared.
195
+ */
196
+ clearRowHighlights(keys?: (string | number)[]): void;
197
+ /**
198
+ * Applies a color highlight to one or more columns.
199
+ *
200
+ * @param columnNames - Column identifiers; either the column `name` (e.g. `cl-firstName`) or its `dataField`.
201
+ * @param color - Semantic highlight color. @defaultValue `'primary'`
202
+ */
203
+ highlightColumns(columnNames: string | string[], color?: AXDataTableRowColorType): void;
204
+ /**
205
+ * Clears column highlights.
206
+ *
207
+ * @param columnNames - When provided, only highlights of these columns are cleared.
208
+ */
209
+ clearColumnHighlights(columnNames?: string | string[]): void;
210
+ /**
211
+ * Returns the highlight color of a column, if any.
212
+ */
213
+ getColumnHighlightColor(column: AXDataTableColumnComponent): AXDataTableRowColorType | null;
214
+ /**
215
+ * Returns the CSS class of a highlighted column, applied to its header and body cells.
184
216
  */
185
- clearRowHighlights(): void;
217
+ getColumnCssClass(column: AXDataTableColumnComponent): string;
186
218
  /**
187
219
  * Returns the temporary highlight state for a row, if any.
188
220
  */
@@ -200,7 +232,7 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
200
232
  */
201
233
  getRowCssClass(row: unknown, rowIndex: number): string;
202
234
  /**
203
- * Returns CSS classes for a body cell, merging column `cssClass` with `cellCssClass`.
235
+ * Returns CSS classes for a body cell, merging column `cssClass`, column highlight, and `cellCssClass`.
204
236
  */
205
237
  getCellCssClass(row: unknown, column: AXDataTableColumnComponent, rowIndex: number): string;
206
238
  /**
@@ -37,6 +37,7 @@ declare const AXDateTimeBoxComponent_base: polytype.Polytype.ClusteredConstructo
37
37
  * @category Components
38
38
  */
39
39
  declare class AXDateTimeBoxComponent extends AXDateTimeBoxComponent_base {
40
+ private readonly defaultConfig;
40
41
  /**
41
42
  * @ignore
42
43
  */
@@ -59,6 +60,7 @@ declare class AXDateTimeBoxComponent extends AXDateTimeBoxComponent_base {
59
60
  * Indicates whether typing is allowed in the input.
60
61
  * When false, clicking the input (or the calendar icon) opens the picker.
61
62
  * When true, the input is for typing and the picker opens from the calendar button.
63
+ * Defaults to `AX_DATETIME_INPUT_CONFIG.allowTyping` when not set on the instance.
62
64
  *
63
65
  * @defaultValue false
64
66
  */
@@ -1,6 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import { InjectionToken } from '@angular/core';
2
3
  import { MXInputBaseValueComponent, AXClickEvent } from '@acorex/cdk/common';
3
4
  import { AXDateTimePickerType } from '@acorex/components/calendar';
5
+ import { AXLocaleProfile } from '@acorex/core/locale';
4
6
 
5
7
  /**
6
8
  * A component for date and time input with segment-based typing, keyboard navigation,
@@ -10,9 +12,9 @@ import { AXDateTimePickerType } from '@acorex/components/calendar';
10
12
  */
11
13
  declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
12
14
  #private;
13
- private platformService;
14
15
  private localeService;
15
16
  private calendarService;
17
+ private readonly defaultConfig;
16
18
  /** @ignore */
17
19
  private readonly _editingParts;
18
20
  /** @ignore */
@@ -24,6 +26,7 @@ declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
24
26
  /**
25
27
  * When true, the user can type digits and navigate segments with the keyboard.
26
28
  * When false, keyboard input is blocked (used by datetime-box picker mode).
29
+ * Defaults to `AX_DATETIME_INPUT_CONFIG.allowTyping` when not set on the instance.
27
30
  * @defaultValue false
28
31
  */
29
32
  allowTyping: _angular_core.InputSignal<boolean>;
@@ -46,6 +49,8 @@ declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
46
49
  protected readonly _calendarSystem: _angular_core.Signal<string>;
47
50
  protected readonly _resolvedFormat: _angular_core.Signal<string>;
48
51
  /** @ignore */
52
+ protected readonly _isHijriRtl: _angular_core.Signal<boolean>;
53
+ /** @ignore */
49
54
  private _editingDate;
50
55
  /** @ignore */
51
56
  private inputRef;
@@ -54,9 +59,7 @@ declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
54
59
  /**
55
60
  * @description check if page is in rtl or ltr
56
61
  */
57
- protected isRtl: _angular_core.WritableSignal<boolean>;
58
- /** @ignore */
59
- protected ngOnInit(): void;
62
+ protected readonly isRtl: _angular_core.Signal<boolean>;
60
63
  /**
61
64
  * Formats a part using the calendar already attached to the AXDateTime.
62
65
  * @ignore
@@ -67,6 +70,8 @@ declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
67
70
  /** @ignore */
68
71
  private _getOrderedParts;
69
72
  /** @ignore */
73
+ private _getNavigationParts;
74
+ /** @ignore */
70
75
  private _clearInputBuffer;
71
76
  /** @ignore */
72
77
  private _updateText;
@@ -108,10 +113,24 @@ declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
108
113
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXDateTimeInputComponent, "ax-datetime-input", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "allowTyping": { "alias": "allowTyping"; "required": false; "isSignal": true; }; "calendar": { "alias": "calendar"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "picker": { "alias": "picker"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onKeyDown": "onKeyDown"; "onKeyUp": "onKeyUp"; "onKeyPress": "onKeyPress"; "onClick": "onClick"; }, never, ["ax-validation-rule"], true, never>;
109
114
  }
110
115
 
116
+ interface AXDateTimeInputConfig {
117
+ allowTyping: boolean;
118
+ }
119
+ declare const AXDateTimeInputDefaultConfig: AXDateTimeInputConfig;
120
+ declare const AX_DATETIME_INPUT_CONFIG: InjectionToken<AXDateTimeInputConfig>;
121
+ declare function resolveDateTimeInputFormat(options: {
122
+ customFormat: string | null | undefined;
123
+ calendarSystem: string;
124
+ picker: AXDateTimePickerType;
125
+ isRtl: boolean;
126
+ localeFormats: AXLocaleProfile['formats'];
127
+ }): string;
128
+
111
129
  declare class AXDateTimeInputModule {
112
130
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDateTimeInputModule, never>;
113
131
  static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXDateTimeInputModule, never, [typeof AXDateTimeInputComponent], [typeof AXDateTimeInputComponent]>;
114
132
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXDateTimeInputModule>;
115
133
  }
116
134
 
117
- export { AXDateTimeInputComponent, AXDateTimeInputModule };
135
+ export { AXDateTimeInputComponent, AXDateTimeInputDefaultConfig, AXDateTimeInputModule, AX_DATETIME_INPUT_CONFIG, resolveDateTimeInputFormat };
136
+ export type { AXDateTimeInputConfig };
@@ -5,6 +5,8 @@ import { NXEvent, NXComponent } from '@acorex/cdk/common';
5
5
  import { Subscription } from 'rxjs';
6
6
  import * as gridstack from 'gridstack';
7
7
 
8
+ /** Grid size preset as `[width, height]` in column/row units. */
9
+ type AXGridLayoutSize = readonly [width: number, height: number];
8
10
  interface AXGridLayoutPosition {
9
11
  /** widget position x (default?: 0) */
10
12
  x?: number;
@@ -22,6 +24,11 @@ interface AXGridLayoutPosition {
22
24
  minWidth?: number;
23
25
  /** minimum height of widget in rows (default?: undefined = un-constrained) */
24
26
  minHeight?: number;
27
+ /**
28
+ * When set, resize is limited to these `[width, height]` presets.
29
+ * Invalid sizes revert to the previous size on resize end. Min/max bounds are derived from this list.
30
+ */
31
+ allowedSizes?: readonly AXGridLayoutSize[];
25
32
  }
26
33
  interface AXGridLayoutWidget extends AXGridLayoutPosition {
27
34
  id?: string;
@@ -318,5 +325,30 @@ declare class AXGridLayoutBuilderModule {
318
325
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXGridLayoutBuilderModule>;
319
326
  }
320
327
 
321
- export { AXGridLayoutBuilderModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent };
322
- export type { AXGridLayout, AXGridLayoutContainerElement, AXGridLayoutEvent, AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutPosition, AXGridLayoutWidget, AXGridLayoutWidgetElement };
328
+ declare const AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR = "data-ax-allowed-sizes";
329
+ declare function convertAXGridLayoutWidgetToGridStackWidget(widget: AXGridLayoutWidget): gridstack.GridStackWidget;
330
+ declare function convertGridStackWidgetToAXGridLayoutWidget(widget: gridstack.GridStackWidget): AXGridLayoutWidget;
331
+ declare function convertAXGridLayoutNodeToGridStackNode(node: AXGridLayoutNode): gridstack.GridStackNode;
332
+ declare function convertGridStackNodeToAXGridLayoutNode(node: gridstack.GridStackNode): AXGridLayoutNode;
333
+ declare function convertAXGridLayoutOptionsToGridStackOptions(options: AXGridLayoutOptions): gridstack.GridStackOptions;
334
+ declare function convertGridStackOptionsToAXGridLayoutOptions(options: gridstack.GridStackOptions): AXGridLayoutOptions;
335
+ /** remove keys which are undefined */
336
+ declare function removeUndefinedKeys<T extends object>(obj: T): T;
337
+ declare function writeAllowedSizesToElement(element: HTMLElement | undefined, allowedSizes: readonly AXGridLayoutSize[] | undefined): void;
338
+ declare function readAllowedSizesFromElement(element: HTMLElement): readonly AXGridLayoutSize[] | undefined;
339
+ declare const AX_GRID_LAYOUT_RESIZE_INVALID_CLASS = "ax-grid-layout-resize-invalid";
340
+ declare const AX_GRID_LAYOUT_RESIZE_PREV_SIZE_ATTR = "data-ax-resize-prev-size";
341
+ declare function isExactAllowedSize(width: number, height: number, allowedSizes: readonly AXGridLayoutSize[]): boolean;
342
+ declare function updateResizeValidityMarkers(gridEl: HTMLElement, element: gridstack.GridItemHTMLElement): void;
343
+ declare function clearResizeValidityMarkers(gridEl: HTMLElement): void;
344
+ declare function storeResizeStartSize(element: gridstack.GridItemHTMLElement): void;
345
+ declare function clearResizeStartSize(element: HTMLElement): void;
346
+ declare function readResizeStartSize(element: HTMLElement): AXGridLayoutSize | undefined;
347
+ declare function snapToAllowedSize(width: number, height: number, allowedSizes: readonly AXGridLayoutSize[]): AXGridLayoutSize;
348
+ declare function deriveMinMaxFromAllowedSizes(allowedSizes: readonly AXGridLayoutSize[]): Pick<AXGridLayoutWidget, 'minWidth' | 'maxWidth' | 'minHeight' | 'maxHeight'>;
349
+ declare function normalizeLayoutNodeWithAllowedSizes<T extends AXGridLayoutWidget>(node: T): T;
350
+ declare function snapElementToAllowedSize(grid: gridstack.GridStack, element: gridstack.GridItemHTMLElement): boolean;
351
+ declare function revertElementToAllowedSizeIfInvalid(grid: gridstack.GridStack, element: gridstack.GridItemHTMLElement): boolean;
352
+
353
+ export { AXGridLayoutBuilderModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent, AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR, AX_GRID_LAYOUT_RESIZE_INVALID_CLASS, AX_GRID_LAYOUT_RESIZE_PREV_SIZE_ATTR, clearResizeStartSize, clearResizeValidityMarkers, convertAXGridLayoutNodeToGridStackNode, convertAXGridLayoutOptionsToGridStackOptions, convertAXGridLayoutWidgetToGridStackWidget, convertGridStackNodeToAXGridLayoutNode, convertGridStackOptionsToAXGridLayoutOptions, convertGridStackWidgetToAXGridLayoutWidget, deriveMinMaxFromAllowedSizes, isExactAllowedSize, normalizeLayoutNodeWithAllowedSizes, readAllowedSizesFromElement, readResizeStartSize, removeUndefinedKeys, revertElementToAllowedSizeIfInvalid, snapElementToAllowedSize, snapToAllowedSize, storeResizeStartSize, updateResizeValidityMarkers, writeAllowedSizesToElement };
354
+ export type { AXGridLayout, AXGridLayoutContainerElement, AXGridLayoutEvent, AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutPosition, AXGridLayoutSize, AXGridLayoutWidget, AXGridLayoutWidgetElement };